Boost logo

Boost :

Subject: Re: [boost] Are memory leaks reported by Boost.Test Microsoft Memory Leak Detection Enabling spurious or real?
From: Thomas Harning Jr. (harningt_at_[hidden])
Date: 2011-01-04 14:13:02


Regarding this problem, I've found more details about it on the Visual
Studio Connect website:
http://connect.microsoft.com/VisualStudio/feedback/details/106937/memory-leaks-reported-by-debug-crt-inside-typeinfo-name

typeinfo is used by the unit test framework if you use
BOOST_AUTO_TEST_CASE_TEMPLATE.

Few fixes that seem reasonable:
All use the following tools: _CrtMemCheckpoint [1] and
_CrtMemDumpAllObjectsSince [2] available since VS2003 to report
objects in specific regions

Few reasonable cases:
 * For the entire test path, if dumping enabled, checkpoint before all
tests start, dump after all tests complete
 * For each test suite, checkpoint before suite starts, dump after
suite ends (complicated by nested suites...)
 * For each test case, checkpoint before test starts, dump after test ends

1: http://msdn.microsoft.com/en-us/library/h3z85t43(v=vs.90).aspx

2: http://msdn.microsoft.com/en-us/library/hhy09244(v=vs.90).aspx

-- 
Thomas Harning Jr.

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk