diff options
author | Paul Gilbert | 2009-10-09 08:15:30 +0000 |
---|---|---|
committer | Paul Gilbert | 2009-10-09 08:15:30 +0000 |
commit | 8694b48ae33fb010312be056e6b830b317e48526 (patch) | |
tree | 06a6c424ecd40f03c56caa461dfe60eaf12c1947 /engines/cruise/font.cpp | |
parent | 3072d54589f223572ce3d147920190bb13e57252 (diff) | |
download | scummvm-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.cpp | 8 |
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); } |