Xref: news2.mv.net comp.os.msdos.djgpp:7313 From: Mihai Moise Newsgroups: comp.os.msdos.djgpp Subject: Re: malloc and free question Date: Thu, 15 Aug 1996 10:57:00 -0400 Organization: Universite Laval Lines: 22 Message-ID: <32133ABC.41C67EA6@ift.ulaval.ca> References: NNTP-Posting-Host: rachmaninov.ift.ulaval.ca 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 J.J. Pierson wrote: > > This is probably more of a general C question, but since I'm using DJGPP, > I figured I'd ask it here in case DJGPP handles it a specific way. > If I use malloc, do I have to use free to free the memory for them when I > quit the program, or does it do that automatically? Thanks in advance. > When you quit a program, all memory previously allocated is freed. In UNIX, open file descriptors are also closed. (else programmmers would go crazy! ) Mihai Lie down, lie down young yeoman, What use to rise and rise? Rise man a thousand mornings And then at last he lies, And then the man is wise. A.E. Housman Check out DOS/svgalib at http://wwwbacc.ift.ulaval.ca/~moisemih