comp.lang.ada
 help / color / mirror / Atom feed
From: chris <spamoff.danx@ntlworld.com>
Subject: Re: Free-ing memory: not springing leaks?
Date: Sun, 14 Sep 2003 13:02:12 +0200
Date: 2003-09-14T13:02:12+02:00	[thread overview]
Message-ID: <9JY8b.1963$WI3.25442@newsfep4-glfd.server.ntli.net> (raw)
In-Reply-To: <uznh89nru.fsf@earthlink.net>

Matthew Heaney wrote:

>>I vaguely recall reading somewhere that in general you shouldn't free C
>>allocated memory from Ada, but perhaps I was mistaken?
> 
> 
> No, you are correct: don't do that.

Thanks for the advice.

What if there is no call to free memory?  For example, the library 
loader for linux error mechanism is to return an error msg describing 
the problem.  Once you have it appears to be your problem what you do 
with it.  There is no call present in the library to return the memory.

Should I bind to a C compiled function to do this?  Perhaps in the case 
of linux, to the free function in the std lib?  I guess you are left to 
free it yourself in C because it provides "free" and it is natural to 
use it in C.


Chris





  reply	other threads:[~2003-09-14 11:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-13 21:33 Free-ing memory: not springing leaks? chris
2003-09-14  1:10 ` Matthew Heaney
2003-09-14 11:02   ` chris [this message]
2003-09-14 12:51     ` Matthew Heaney
2003-09-14 12:14       ` chris
2003-09-14 14:24         ` Ludovic Brenta
2003-09-14 19:00           ` chris
2003-09-14 16:06         ` Simon Wright
2003-09-15  7:13           ` Martin Krischik
2003-09-18 20:15         ` Warren W. Gay VE3WWG
2003-09-19  3:02           ` Hyman Rosen
2003-09-19 13:07             ` Warren W. Gay VE3WWG
replies disabled

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