www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/08/27/22:32:41

Sender: nate AT cartsys DOT com
Message-ID: <35E60546.8135AD77@cartsys.com>
Date: Thu, 27 Aug 1998 18:17:59 -0700
From: Nate Eldredge <nate AT cartsys DOT com>
MIME-Version: 1.0
To: Cephaler <cephaler AT hotmail DOT com>
CC: djgpp AT delorie DOT com
Subject: Re: memory leaks
References: <01bdd13a$6597d6c0$50c3b8cd AT scully>

Cephaler wrote:
> 
>   I've just finished a good sized chunk of code for my game, and it uses
> lots and lots of pointers. I know from past experiences that memory leaks
> make programs crash (over time?) But this one seems to be ok.. I figure
> since it's a memory 'leak' (I don't really know what a leak is, a pointer
> that's wasn't freed?)

Right.

> I'd go check mem(the dos command) to see if any of
> the values changed, but I began to wonder if windows hides some values from
> command.com.

All your memory is freed when your program exits, so a memory leak is
only really a problem if it leaks enormous amounts of memory (which can
happen if the offending code runs many times).  It is good practice to
avoid them, however.

>. Is there a quick way to see if you've got a memory leak?

Several tools have been mentioned.
-- 

Nate Eldredge
nate AT cartsys DOT com


- Raw text -


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