diff -r 08583103ba6f -r 093c72464b35 sourcehook/test/test3.cpp --- a/sourcehook/test/test3.cpp Sun Oct 07 23:00:38 2007 +0000 +++ b/sourcehook/test/test3.cpp Mon Oct 08 14:20:51 2007 +0000 @@ -65,6 +65,11 @@ { ADD_STATE(State_Func3H_Called(META_IFACEPTR(void))); } + + Derived *MyInstanceFactory() + { + return new Derived; + } } bool TestThisPtrOffs(std::string &error) @@ -72,11 +77,13 @@ GET_SHPTR(g_SHPtr); g_PLID = 1337; - Derived inst; - Derived *pD = &inst; + Derived *pD = MyInstanceFactory(); Base1 *pB1 = pD; Base2 *pB2 = pD; + CAutoPtrDestruction apd(pD); + + // It should be: // pB1 = pD // pB2 > pB1