diff -r 08583103ba6f -r 093c72464b35 sourcehook/test/test1.cpp --- a/sourcehook/test/test1.cpp Sun Oct 07 23:00:38 2007 +0000 +++ b/sourcehook/test/test1.cpp Mon Oct 08 14:20:51 2007 +0000 @@ -391,6 +391,11 @@ { hello = 10; } + + Test *MyTestFactory() + { + return new Test; + } } template T func(T a) @@ -398,7 +403,6 @@ return a; } - bool TestBasic(std::string &error) { // Simple test for ModuleInMemory @@ -416,8 +420,8 @@ g_PLID = 1337; HandlersF1 f1_handlers; - Test test; - Test *pTest = &test; + Test *pTest = MyTestFactory(); + CAutoPtrDestruction apd(pTest); void *pOrigVfnPtrF1 = (*reinterpret_cast(pTest))[0];