[Quickfix-developers] Memory Leaks Version 1.5
Brought to you by:
orenmnero
|
From: Jon D. <jd...@Li...> - 2003-07-02 18:26:54
|
I have my own custom memory leak class and have included it into the =
debug version of the TradeClient app.
When the app ends, there are a bunch of memory dumps being reported in =
the Output screen in VC++6.
Has anyone tested Quickfix for memory leaks or could these just be false =
positives with the heavy
use of STL templates?
Here is the code for my leaks class:
//#define _CRTDBG_MAP_ALLOC
#include <stdlib.h>
#include <string.h>
#include <crtdbg.h>
#ifdef _DEBUG
#define new new(_NORMAL_BLOCK, THIS_FILE, __LINE__)
#endif
class FindMemoryLeaks
{
public:
CrtMemState m_checkpoint;
=20
FindMemoryLeaks()
{
_CrtMemCheckpoint(&m_checkpoint);
};
~FindMemoryLeaks()
{
_CrtMemState checkpoint;
_CrtMemCheckpoint(&checkpoint);
_CrtMemState diff;
_CrtMemDifference(&diff, &m_checkpoint, &checkpoint);
_CrtMemDumpStatistics(&diff);
_CrtMemDumpAllObjectsSince(&diff);
};
};
TIA,
JD
|