Sender: nate AT cartsys DOT com Message-ID: <37C19A5C.51C150AF@cartsys.com> Date: Mon, 23 Aug 1999 12:00:44 -0700 From: Nate Eldredge X-Mailer: Mozilla 4.08 [en] (X11; I; Linux 2.2.12pre4 i586) MIME-Version: 1.0 To: djgpp AT delorie DOT com Subject: Re: About memory allocation References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp AT delorie DOT com OmniMeta wrote: > > My question is : > if i do this : > > int *p; > int main() > { > p = new int; > return 0; > } > > Here I didn't use the delete operator to free p > Did p will be automaticaly deleted with the end of the program, or did p > will stay in memory until i reboot ? When your program exits, all memory allocated by `malloc' or `new' is freed. -- Nate Eldredge nate AT cartsys DOT com