From: "John M. Aldrich" Newsgroups: comp.os.msdos.djgpp Subject: Re: Malloc & Co. Date: Tue, 07 Jan 1997 00:49:19 -0800 Organization: Two pounds of chaos and a pinch of salt Lines: 20 Message-ID: <32D20E0F.5AB0@cs.com> References: <19970106 DOT 194216 DOT 4975 DOT 0 DOT chambersb AT juno DOT com> Reply-To: fighteer AT cs DOT com NNTP-Posting-Host: ppp102.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 Benjamin D Chambers wrote: > > When my program exits, is all the allocated memory on freed > automatically, or is the system retained unless I cal 'free' on all my > memory blocks (that I allocated with malloc & calloc)? All memory that is allocated using sbrk(), malloc(), and its family, is automatically freed by the DJGPP exit code. It is, however, generally good programming to clean things up yourself (although very few programmers actually bother to do it). -- John M. Aldrich, aka Fighteer I -----BEGIN GEEK CODE BLOCK----- Version: 3.1 GCS d- s+:- a-->? c++>$ U@>++$ p>+ L>++ E>++ W++ N++ o+>++ K? w(---) O- M-- V? PS+ PE Y+ PGP- t+(-) 5- X- R+(++) tv+() b+++ DI++ D++ G>++ e(*)>++++ h!() !r !y+() ------END GEEK CODE BLOCK------