delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/08/15/17:30:26

Xref: news2.mv.net comp.os.msdos.djgpp:7313
From: Mihai Moise <moisemih AT ift DOT ulaval DOT ca>
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: <Dw3Kr1 DOT Drz AT interactive DOT net>
NNTP-Posting-Host: rachmaninov.ift.ulaval.ca
Mime-Version: 1.0
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

- Raw text -


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