Re: _CrtMemCheckpoint & _CrtMemDumpAllObjectsSince



I checked out LeakFinder, and it reported a lot of memory leaks, but I
am not sure I used the tool correctly, so I was hoping someone could
verify that the function bellow would cause a memory leak because that
is what LeakFinder reports. It is specifically:

_bstr_t((long)GetTickCount() - m_startTick)

that is reported to cause the error leak. m_startTick is just a long
that gets assigned the value of GetTickCount() at the very beginning,
so I am calling the function below to see how long a certain part of
the code took.

void CPE::TraceTick(_bstr_t at)
{
Trace("TickCount: " + _bstr_t((long)GetTickCount() - m_startTick) +
" at " + at);
}

If this should not be a memory leak, maybe someone familiar with
LeakFinder can correct my placement of InitAllocCheck() and
DeInitAllocCheck(). I placed it at the top and bottom of my function.

Thanks,

TK

.