aboutsummaryrefslogtreecommitdiff
path: root/engines/cruise/font.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2009-10-09 08:15:30 +0000
committerPaul Gilbert2009-10-09 08:15:30 +0000
commit8694b48ae33fb010312be056e6b830b317e48526 (patch)
tree06a6c424ecd40f03c56caa461dfe60eaf12c1947 /engines/cruise/font.cpp
parent3072d54589f223572ce3d147920190bb13e57252 (diff)
downloadscummvm-rg350-8694b48ae33fb010312be056e6b830b317e48526.tar.gz
scummvm-rg350-8694b48ae33fb010312be056e6b830b317e48526.tar.bz2
scummvm-rg350-8694b48ae33fb010312be056e6b830b317e48526.zip
Set up a basic tracing system for all memory allocations to help track down memory leaks
svn-id: r44808
Diffstat (limited to 'engines/cruise/font.cpp')
-rw-r--r--engines/cruise/font.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/cruise/font.cpp b/engines/cruise/font.cpp
index c1afba3c45..bd9b2e2644 100644
--- a/engines/cruise/font.cpp
+++ b/engines/cruise/font.cpp
@@ -169,7 +169,7 @@ void initSystem(void) {
}
void freeSystem(void) {
- free(_systemFNT);
+ MemFree(_systemFNT);
}
void bigEndianShortToNative(void *var) {
@@ -349,7 +349,7 @@ gfxEntryStruct *renderText(int inRightBorder_X, const char *string) {
(uint8 *) mallocAndZero(stringRenderBufferSize);
resetBitmap(currentStrRenderBuffer, stringRenderBufferSize);
- generatedGfxEntry = (gfxEntryStruct *) malloc(sizeof(gfxEntryStruct));
+ generatedGfxEntry = (gfxEntryStruct *) MemAlloc(sizeof(gfxEntryStruct));
generatedGfxEntry->imagePtr = currentStrRenderBuffer;
generatedGfxEntry->imageSize = stringRenderBufferSize / 2;
generatedGfxEntry->fontIndex = fontFileIndex;
@@ -430,10 +430,10 @@ gfxEntryStruct *renderText(int inRightBorder_X, const char *string) {
void freeGfx(gfxEntryStruct *pGfx) {
if (pGfx->imagePtr) {
- free(pGfx->imagePtr);
+ MemFree(pGfx->imagePtr);
}
- free(pGfx);
+ MemFree(pGfx);
}