Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Statistics needed on memory leaks for chess programs

Author: Robert Hyatt

Date: 19:23:58 12/28/98

Go up one level in this thread


On December 28, 1998 at 18:26:47, KarinsDad wrote:

>On December 28, 1998 at 17:50:59, Inmann Werner wrote:
>
>>Try to use some Microsoft Compilers (C++, Foxpro..). If you run some of the
>>"sample applications" again and again, you will see the decreasing memory!
>>
>>I hate it, cause I have to do with it every day.
>>
>>Most problem is, if you create an object in the running program. Then you kill
>>the "father". Take a look!
>>
>>Regards
>>
>>Werner
>
>Werner,
>
>I was trying to re-create what I have seen before and was unsuccessful. I could
>create memory leaks with no problem, but the OS always cleaned it back up when
>the application exited (as is proper). Please let me know which sample C++
>applications you were using, which "father" objects you destroyed, and on which
>OS.
>
>Thanks,
>
>KarinsDad


I don't follow any of this.  IE in crafty, I "malloc()" the hash tables, I
do _not_ free() them before I exit(0) the program.  And the memory gets freed
up under windows just as it does under linux.  Yes I can create a thread and
so long as a thread "lives" its resources remain allocated.  But I don't know
of commercial chess programs that create threads so don't see where this is a
problem.

this "object" discussion loses me.  An object (in C++) is not a permanent thing
that exists 'on its own'... it is simply a data structure that comes into being
when you access an object constructor, and disappears when you access the
destructor...  but when the program terminates, the objects disappear along
with it...



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.