This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Problem with delete[] in class destructor
- From: Nathan Sidwell <nathan at codesourcery dot com>
- To: Nicolas Wack <nwack at iua dot upf dot es>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Tue, 22 Mar 2005 10:01:13 +0000
- Subject: Re: Problem with delete[] in class destructor
- Organization: Codesourcery LLC
- References: <423FEB0C.6010901@iua.upf.es>
Nicolas Wack wrote:
Hi all!
I have a little problem, and I thought maybe someone could help me out
before I go crazy!!
Here's a simple file that allocates some amount of memory (roughly
300MB), sleeps for 5 secs, deallocates it and sleeps for 15 seconds.
I know for sure that the program goes through all the destructors,
however nothing gets freed...
define 'freed'. Do you mean
1) returned to the program's free memory pool?
2) returned to the OS?
Unless you do something system specific, #1 is what will happen (because
that's what the standard says should happen)
nathan
--
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
nathan@codesourcery.com :: http://www.planetfall.pwp.blueyonder.co.uk