[Super-tux-devel] Memory leak
Brought to you by:
wkendrick
From: <ri...@ae...> - 2004-01-08 19:19:14
|
=20 Hey there,=20 =20 I think there is a memory leak when the fullscreen is toggled.=20 When the user hits FullScreen On/Off, st_video_setup() is called and=20 the screen surface is not deallocated.=20 The fix is to write the following lines in the st_video_setup() func=20 in the setup.c file:=20 if(screen !=3D NULL)=20 SDL_FreeSurface(screen);=20 =20 But SDL developers ask to toggle screen using=20 SDL_WM_ToggleScreen(screen). However, I think this doesn't work=20 properly in all systems (works fine under Kwin (KDE), gnome wm,=20 window maker and icewm). In case it doesn't work under windows, we=20 could use an ifdef.=20 =20 Anyway, since the game will use OpenGL, instead of SDL for=20 graphics, there will not be a screen surface at all ;)=20 =20 Ricardo Cruz=20 =20 _________________________________________________________ Acesso Gr=E1tis =E0 Internet do AEIOU: Sem formul=E1rios, sem password, ligue-se j=E1! http://acesso.aeiou.pt |