diff options
author | rubidium <rubidium@openttd.org> | 2007-07-20 18:44:04 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-07-20 18:44:04 +0000 |
commit | 5083f22d1ddddd355d75a3d720fc2f5a3acd12a5 (patch) | |
tree | 5f1f70f105e1d48e5c98012e8393a7374f6668e7 /src/misc/autoptr.hpp | |
parent | 3f983ff1f227420eed715f4333a3055e9196eeef (diff) | |
download | openttd-5083f22d1ddddd355d75a3d720fc2f5a3acd12a5.tar.xz |
(svn r10644) -Merge (from NoAI): framework for reference counted objects (pointers).
Diffstat (limited to 'src/misc/autoptr.hpp')
-rw-r--r-- | src/misc/autoptr.hpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/misc/autoptr.hpp b/src/misc/autoptr.hpp index 08516d2ea..3719a51f1 100644 --- a/src/misc/autoptr.hpp +++ b/src/misc/autoptr.hpp @@ -38,8 +38,9 @@ public: FORCEINLINE ~AutoPtrT() { if (m_p != NULL) { - delete m_p; + T *p = m_p; m_p = NULL; + delete p; } } |