delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/03/02/02:53:27

From: "John M. Aldrich" <fighteer AT cs DOT com>
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: <B0000041587 AT datasoft DOT datasoft DOT com DOT br>
Reply-To: fighteer AT cs DOT com
NNTP-Posting-Host: ppp110.cs.com
Mime-Version: 1.0
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...|
---------------------------------------------------------------------

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019