trying diffrent way to prevent logging of files when CAUDIO_USE_MMGR isnt defined

This commit is contained in:
Raynaldo Rivera 2010-02-21 04:00:32 +00:00
parent 6534bc16bf
commit 5599cdadf3
2 changed files with 8 additions and 1 deletions

View File

@ -254,8 +254,10 @@ static void doCleanupLogOnFirstRun();
// Local functions only
// ---------------------------------------------------------------------------------------------------------------------------------
static void log(const char *format, ...)
{
#ifdef CAUDIO_USE_MMGR
// Cleanup the log?
if (cleanupLogOnFirstRun) doCleanupLogOnFirstRun();
@ -282,8 +284,10 @@ static void log(const char *format, ...)
fprintf(fp, "%s\r\n", buffer);
fclose(fp);
#endif
}
// ---------------------------------------------------------------------------------------------------------------------------------
static void doCleanupLogOnFirstRun()
@ -531,6 +535,7 @@ static void dumpAllocations(FILE *fp)
static void dumpLeakReport()
{
#ifdef CAUDIO_USE_MMGR
// Open the report file
FILE *fp = fopen(memoryLeakLogFile, "w+b");
@ -583,6 +588,7 @@ static void dumpLeakReport()
}
fclose(fp);
#endif
}
// ---------------------------------------------------------------------------------------------------------------------------------

View File

@ -5,10 +5,11 @@
#include <cstring>
#include <iostream>
#ifdef CAUDIO_USE_MMGR
#ifndef CAUDIO_USE_MMGR
#include "../Headers/cMemoryManager.h"
#endif
#include "../Headers/cMemorySource.h"
namespace cAudio