comp.lang.ada
 help / color / mirror / Atom feed
* Free()
@ 1999-05-16  0:00 Jim Whatley
  1999-05-16  0:00 ` Free() Florian Weimer
  0 siblings, 1 reply; 3+ messages in thread
From: Jim Whatley @ 1999-05-16  0:00 UTC (permalink / raw)


Good day,

  Have a question about how to use Free() in Gnat 3.11p.  Neither myself,
nor my instuctor, have been able to get it to work.  I've checked the gnat
RM and UG and it *appears* all I need to do to use it is
"Free(access_type_name)" but I get Free is undefined.

  If someone could point me in the right direction that I need to be looking
I'd greatly appreciate it.

Jim

(remove underscore in email address to get correct address)






^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Free()
  1999-05-16  0:00 Free() Jim Whatley
@ 1999-05-16  0:00 ` Florian Weimer
  1999-06-13  0:00   ` Free() Chris Warwick
  0 siblings, 1 reply; 3+ messages in thread
From: Florian Weimer @ 1999-05-16  0:00 UTC (permalink / raw)


"Jim Whatley" <wha_tlje@dotsar.net> writes:

>   Have a question about how to use Free() in Gnat 3.11p.  Neither myself,
> nor my instuctor, have been able to get it to work.  I've checked the gnat
> RM and UG and it *appears* all I need to do to use it is
> "Free(access_type_name)" but I get Free is undefined.

`Free' has to be an instantiation of Ada.Unchecked_Deallocation, like
this:

       procedure Free is
           new Ada.Unchecked_Deallocation(
               object_subtype_name, access_to_variable_subtype_name);




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Free()
  1999-05-16  0:00 ` Free() Florian Weimer
@ 1999-06-13  0:00   ` Chris Warwick
  0 siblings, 0 replies; 3+ messages in thread
From: Chris Warwick @ 1999-06-13  0:00 UTC (permalink / raw)


In article <m3yaioswql.fsf@deneb.cygnus.stuttgart.netsurf.de>, Florian Weimer <fw@cygnus.stuttgart.netsurf.de> wrote:
>`Free' has to be an instantiation of Ada.Unchecked_Deallocation, like
>this:
>
>       procedure Free is
>           new Ada.Unchecked_Deallocation(
>               object_subtype_name, access_to_variable_subtype_name);

Not if he/she is digging for the Unix Free... In that case the Free call is 
probably an interface, and the problem is coming because the interface does 
not have access to the correct Unix library. So, some sort of arguement like 
"-lm" is needed to include the correct library (my Unix box is at the 
office)...




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1999-06-13  0:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-05-16  0:00 Free() Jim Whatley
1999-05-16  0:00 ` Free() Florian Weimer
1999-06-13  0:00   ` Free() Chris Warwick

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox