“Derethor” wrote
I’d like to know if there area any debug versions available for the
SDL package (specially for debian woody ;). I am using memprof to
know if I have mem leaks, and when I load a BMP using SDL_LoadBMP,
I have a big one… Anyone has tested this before?
sorry this isn’t a direct answer, but are you converting
the loaded image and not getting rid of the temporary?
SDL_Surface* img = SDL_ConvertDisplay(
SDL_LoadBMP(’/root/.pr0n/yomamma.bmp’);
this would definitely leak a bit of memory as you end up
making two copies of the image, but only keeping a pointer
to one of them.
I’d like to know if there area any debug versions available for the
SDL package (specially for debian woody ;). I am using memprof to
know if I have mem leaks, and when I load a BMP using SDL_LoadBMP,
I have a big one… Anyone has tested this before?
Thanks!–
signed
derethor of centolos
Pete Shinners wrote:
sorry this isn’t a direct answer, but are you converting
the loaded image and not getting rid of the temporary?
SDL_Surface* img = SDL_ConvertDisplay(
SDL_LoadBMP(’/root/.pr0n/yomamma.bmp’);
this would definitely leak a bit of memory as you end up
making two copies of the image, but only keeping a pointer
to one of them.
ups, You’re right! the issue was that I load the image on a
surface, and then, I blit it to the visible one… (keeping
the temp image on memory), it is fine now! thanks for the trick!–
signed
derethor of centolos