From: Erik Max Francis Newsgroups: comp.os.msdos.djgpp Subject: Re: quick malloc question Date: Sun, 02 Mar 1997 23:10:37 -0800 Organization: Alcyone Systems Lines: 21 Message-ID: <331A796D.485A2646@alcyone.com> References: <331950FD DOT 4F9 AT cs DOT com> NNTP-Posting-Host: newton.alcyone.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp John M. Aldrich wrote: > Yes. It's automatically freed by the program's exit code. There are > some purists who say you should free it anyway - I'm ambivalent on the > issue. :) Yes, it's guaranteed that allocated memory will be freed upon program exit. I only explicitly free allocated memory before exit (or in destructors or what have you in C++) because 1. I consider it good style (but again, it's a purist issue), and 2. if you change the program into a library or some other context where it isn't necessarily operating in its own little world, then you'll have to put it in at some point. -- Erik Max Francis, &tSftDotIotE / email: max AT alcyone DOT com Alcyone Systems / web: http://www.alcyone.com/max/ San Jose, California, United States / icbm: 37 20 07 N 121 53 38 W \ "I am become death, / destroyer of worlds." / J. Robert Oppenheimer (quoting legend)