Can we add some code around runTest() in TestCase::run() to detect a memory leak in the tested function?
I have a solution, but it's only valid for a MS-Windows version.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2001-01-08
One could add some hooks for mem leaks detection and provide whichever implementation.
Under Visual C++/Windows, it could use built-in debug API for memory management.
Under Unixes, a plug-in for Purify.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
We use Purify with our test suites and it works
pretty well *except* when a test fails. :-(
The current version of Purify gacks when you throw an exception using GCC 2.95.2.
That makes me wonder why cppunit is implemented using exceptions. It doesn't seem especially necessary, and exceptions are *still* an iffy area of compatibility in C++.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Can we add some code around runTest() in TestCase::run() to detect a memory leak in the tested function?
I have a solution, but it's only valid for a MS-Windows version.
One could add some hooks for mem leaks detection and provide whichever implementation.
Under Visual C++/Windows, it could use built-in debug API for memory management.
Under Unixes, a plug-in for Purify.
We use Purify with our test suites and it works
pretty well *except* when a test fails. :-(
The current version of Purify gacks when you throw an exception using GCC 2.95.2.
That makes me wonder why cppunit is implemented using exceptions. It doesn't seem especially necessary, and exceptions are *still* an iffy area of compatibility in C++.