From: "John M. Aldrich" Newsgroups: comp.os.msdos.djgpp Subject: Re: quick malloc question Date: Sun, 02 Mar 1997 02:05:49 -0800 Organization: Two pounds of chaos and a pinch of salt Lines: 16 Message-ID: <331950FD.4F9@cs.com> References: Reply-To: fighteer AT cs DOT com NNTP-Posting-Host: ppp110.cs.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 Cristovao Braga wrote: > > I was wondering: if I allocate some memory with malloc () or an equivalent > function and then quit the program without calling free (), will this > memory be freed automatically? 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. :) -- --------------------------------------------------------------------- | John M. Aldrich, aka Fighteer I | fighteer AT cs DOT com | | Descent 2: The Infinite Abyss - The greatest Internet game of all | | time just got better! This time, you're going all the way down...| ---------------------------------------------------------------------