home *** CD-ROM | disk | FTP | other *** search
- Path: sdd.hp.com!inn
- From: Jeff Grimmett <jgrimm@sdd.hp.com>
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: Must I free my linked lists? (GCC)
- Date: 22 Jan 1996 18:16:34 GMT
- Organization: Hewlett-Packard Company
- Message-ID: <4e0ka2$2tu@news.sdd.hp.com>
- References: <4dudic$aif@vixen.cso.uiuc.edu>
- NNTP-Posting-Host: hpsdv330.sdd.hp.com
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 1.2N (Windows; I; 16bit)
-
- Dannyman@uiuc.edu (Unknown) wrote:
-
- > "When my program exits, is the dynamic memory in the queues returned to
- >the system or is a "memory hole" left, so that I should actually go back and
- >return all the memory in my program ..."
-
- If I understand you correctly, you want to know if you have to deallocate
- the nodes in a linked list after creating it/them? My answer is yes, if
- so. If you allocate it (AllocMem, malloc, whatever), you have to free
- it, or it will be left, as you say, as a hole in the system memory.
-
- The RKM includes some code examples for allocating and deallocating
- linked lists.
-
-
-