(svn r9409) [NoAI] -Codechange: make AutoPtrT dtor() bit more robust - prevent recursive dtor() calls in the case of circular references noai
authorKUDr
Thu, 22 Mar 2007 22:53:44 +0000
branchnoai
changeset 9512 36a53e169661
parent 9511 f767ad06e86b
child 9513 258f78c74b0c
(svn r9409) [NoAI] -Codechange: make AutoPtrT dtor() bit more robust - prevent recursive dtor() calls in the case of circular references
src/misc/autoptr.hpp
--- a/src/misc/autoptr.hpp	Thu Mar 22 09:52:12 2007 +0000
+++ b/src/misc/autoptr.hpp	Thu Mar 22 22:53:44 2007 +0000
@@ -36,8 +36,9 @@
 	FORCEINLINE ~AutoPtrT()
 	{
 		if (m_p != NULL) {
-			delete m_p;
+			T *p = m_p;
 			m_p = NULL;
+			delete p;
 		}
 	}