[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-freedink] Re: FreeDink memory leaks.
From: |
Sylvain Beucler |
Subject: |
[Bug-freedink] Re: FreeDink memory leaks. |
Date: |
Mon, 12 May 2008 23:50:43 +0200 |
User-agent: |
Mutt/1.5.17+20080114 (2008-01-14) |
Hi,
Thanks for testing FreeDink!
I looked at the file pointers issue and eventually freed all RWops
passed to load_bmp_internal (memory and file pointers).
That's a nice catch, what made you notice it? :)
For the increasing memory, I'm not able to reproduce it. I ran
FreeDink through Valgrind and couldn't find leaks even after reloading
games several times. Can you precise me how you test this? (main game
or D-Mod, how to measure the used RAM, reload game vs. restart game,
platform, FreeDink version, etc.).
Dink uses a fixed number of graphics slots, so hopefully a leak
shouldn't be too hard to track.
Cheers,
--
Sylvain
On Mon, May 12, 2008 at 05:09:41PM +0200, José María Pavón Núñez wrote:
> Hello,
>
> Firstly, many thanks for your wonderful Dink port :)
>
> And now the bugs:
>
> - It seems that every time you restart the game or
> load a savegame FreeDink needs more and more memory. My guess is that
> the sprites (and maybe other resources) are loaded over and over
> without them being freed if already in memory.
>
> - load_sprites function doesn't close the file loaded by
> load_bmp_from_fp so FreeDink ends having hundreds of opened files.
>
> Adding
> if (in) fclose(in);
> after the line
> GFX_k[cur_sprite].k = load_bmp_from_fp(in);
> should do the trick.
>
> Thanks in advance.
- [Bug-freedink] Re: FreeDink memory leaks.,
Sylvain Beucler <=
Message not available