delorie.com/archives/browse.cgi | search |
From: | "Michael Stewart" <mike AT reggin DOT freeserve DOT co DOT uk> |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: About memory allocation |
Date: | Mon, 23 Aug 1999 16:15:53 +0100 |
Organization: | (Posted via) Netcom Internet Ltd. |
Message-ID: | <7proji$6vo$1@taliesin.netcom.net.uk> |
References: | <Fvdw3.325$Os5 DOT 51835 AT wagner DOT videotron DOT net> |
NNTP-Posting-Host: | hgty.capgemini.co.uk |
X-Trace: | taliesin.netcom.net.uk 935421362 7160 194.42.240.2 (23 Aug 1999 15:16:02 GMT) |
X-Complaints-To: | abuse AT corp DOT netcom DOT net DOT uk |
NNTP-Posting-Date: | 23 Aug 1999 15:16:02 GMT |
X-Newsreader: | Microsoft Outlook Express 4.72.3155.0 |
X-MimeOLE: | Produced By Microsoft MimeOLE V4.72.3155.0 |
Lines: | 20 |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
OmniMeta wrote in message ... >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 ? p will be free'd by the OS. Although it is good practice to free up all dynamic memory yourself just in case the OS doesn't do it properly.
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |