adonthell-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Adonthell-devel] Memleaks!


From: Kai Sterker
Subject: Re: [Adonthell-devel] Memleaks!
Date: Sat, 28 Sep 2002 19:24:39 +0200

On Sat, 28 Sep 2002 12:26:16 +0200 Alexandre Courbot wrote:

> Ok, everything seems to be fine for the release, excepted that we
> suffer from some memory leaks. The memory usage slightly increase as
> the game goes on. I'd maybe suspect the new event system, as it is the
> only really new thing since last release. But the most funny is here:
> press escape rapidly a lot of time, and look at your memory monitor
> filling the memory bar! It looks like the memory allocate for the menu
> is*never* released, which makes a little Mb of memory every time.

Well, it's fairly obvious why this happens: the main_menu instances are
never free'd. A solution to this isn't that simple however. I will have
a closer look this evening and tomorrow.

Other than that, I fixed a few minor issues with uninitialised variables
valgrind reported.

The good news is that there seem to be no real memleaks, i.e. memory
that is allocated and no longer referenced. That's probably the reason
why memleak reported nothing. OTOH, there are 85 occasions where memory
isn't free'd before quitting. I.e. it's no longer used, but there's
still a pointer to it somewhere. I fixed one of those, but I doubt that
we can get rid of all of them. The main menu issue is the most grave of
those, so I'll try to get rid of that at least.

Kai

P.S: Thanks for the hint, Alex; valgrind does really rock! :)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]