[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gnugo-devel] bugs report
From: |
Arend Bayer |
Subject: |
Re: [gnugo-devel] bugs report |
Date: |
Sun, 27 Jul 2003 20:31:00 +0200 (MEST) |
Trevor wrote:
> >> There is no point in freeing blocks at the end of a program, because
> >> all of the program's space is given back to the system when the process
> >> terminates.
> >
> >Is this comment is specific to GCC or is it true for all
> >compilers? (Pcibus is running VC++). If I understand correctly
> >there is no need to call cfree for the owl stack and hash tables.
> >
> >Dan
>
> This is more of an OS point than a compiler point.
>
> Windows will reclaim the memory after the application finishes, just
> as documented above. None-the-less, most (all?) memory check
> programs are going to point out the memory that you didn't free as
> possible memory leaks. For this reason alone, it might be worth
> freeing the memory on application exit.
Well, only if it does not complicate the code I would say.
Also, valgrind (only available on Linux) will only report leaked memory
that is not reachable anymore (i.e. that does not have a pointer pointing to
it somewhere). This makes much more sense.
Arend
Re: [gnugo-devel] bugs report, bump, 2003/07/11