diff -r 08583103ba6f -r 093c72464b35 sourcehook/test/test4.cpp --- a/sourcehook/test/test4.cpp Sun Oct 07 23:00:38 2007 +0000 +++ b/sourcehook/test/test4.cpp Mon Oct 08 14:20:51 2007 +0000 @@ -54,6 +54,11 @@ { ADD_STATE(State_Func3H_Called); } + + Test *MyTestFactory() + { + return new Test; + } } bool TestPlugSys(std::string &error) @@ -61,8 +66,8 @@ GET_SHPTR(g_SHPtr); g_PLID = 1; - Test inst; - Test *pInst = &inst; + Test *pInst = MyTestFactory(); + CAutoPtrDestruction apd(pInst); // 1) // Add hooks, then issue a complete shutdown