How about you just use the same solution like TimeHelpers.*. Alternatively use polymorphism: a Win32LeakDetector and a NullLeakDetector class.
Nevertheless; leak detection should be a runtime switch with no overhead when off. Sean On Sun, Jan 31, 2010 at 10:08 PM, Clark Gaebel <cg.wowus...@gmail.com> wrote: > http://github.com/wowus/unittest-cpp/commit/eede1787ab28ce420ada7b74dbd969f7a59145bd > > A bit easier to use solution. > > Although the #ifdef hell going on in LeakDetector.cpp is killing me. If > anyone has a better/cleaner way to do that, by all means submit a patch. > > Working on a EXPECT_LEAK macro now. > > On 31/01/2010 4:06 PM, Sean Farrell wrote: >> On Sun, Jan 31, 2010 at 8:19 PM, Patrick Johnmeyer <pjohnme...@gmail.com> >> wrote: >>> >>> On Sun, Jan 31, 2010 at 12:21 PM, Sean Farrell <sean.farr...@rioki.org> >>> wrote: >>>> >>>> I have a better problem for you. For example you use a garbage >>>> collector for C/C++ like this one: >>>> http://www.hpl.hp.com/personal/Hans_Boehm/gc/ The checking code will >>>> flag almost all tests as memory errors. Leak detection is really >>>> useful, but It should be an option that is turned on (or off). Not >>>> hard coded into the library. For example I don't use the time >>>> constants at all. Since I don't care for runtime in the Tests. >>> >>> Architecturally, instantiating an object that decorates a TestRunner or >>> TestReporter might be a good way to explicitly enable memory leak detection >>> logic. >> >> I don't know if I can follow you. Please elaborate on your proposed >> solution... >> >> Sean >> >> ------------------------------------------------------------------------------ >> The Planet: dedicated and managed hosting, cloud storage, colocation >> Stay online with enterprise data centers and the best network in the business >> Choose flexible plans and management services without long-term contracts >> Personal 24x7 support from experience hosting pros just a phone call away. >> http://p.sf.net/sfu/theplanet-com >> _______________________________________________ >> unittest-cpp-devel mailing list >> unittest-cpp-devel@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/unittest-cpp-devel > > ------------------------------------------------------------------------------ > The Planet: dedicated and managed hosting, cloud storage, colocation > Stay online with enterprise data centers and the best network in the business > Choose flexible plans and management services without long-term contracts > Personal 24x7 support from experience hosting pros just a phone call away. > http://p.sf.net/sfu/theplanet-com > _______________________________________________ > unittest-cpp-devel mailing list > unittest-cpp-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/unittest-cpp-devel > ------------------------------------------------------------------------------ The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com _______________________________________________ unittest-cpp-devel mailing list unittest-cpp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/unittest-cpp-devel