[Scummvm-cvs-logs] CVS: scummvm/sword2 maketext.h,1.13,1.14
Torbjörn Andersson
eriktorbjorn at users.sourceforge.net
Tue Aug 24 22:58:01 CEST 2004
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm intern.h,2.194,2.195 script_v72he.cpp,2.14,2.15
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm intern.h,2.195,2.196 script_v72he.cpp,2.15,2.16 scumm.cpp,1.136,1.137 scumm.h,1.450,1.451
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/sword2
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25638
Modified Files:
maketext.h
Log Message:
Added a destructor to the FontRenderer class to free any remaining text
sprites on exit. As far as I can tell, the only case when this makes any
difference is when there is text on screen when you quit ScummVM, so it's
not really a memory leak, but Valgrind will report it as one.
Index: maketext.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/maketext.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- maketext.h 23 Apr 2004 07:01:38 -0000 1.13
+++ maketext.h 25 Aug 2004 05:57:17 -0000 1.14
@@ -99,6 +99,11 @@
_blocList[i].text_mem = NULL;
}
+ ~FontRenderer() {
+ for (int i = 0; i < MAX_text_blocs; i++)
+ free(_blocList[i].text_mem);
+ }
+
byte *makeTextSprite(byte *sentence, uint16 maxWidth, uint8 pen, uint32 fontRes, uint8 border = BORDER_PEN);
void killTextBloc(uint32 bloc_number);
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm intern.h,2.194,2.195 script_v72he.cpp,2.14,2.15
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm intern.h,2.195,2.196 script_v72he.cpp,2.15,2.16 scumm.cpp,1.136,1.137 scumm.h,1.450,1.451
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list