diff options
author | Murray Cumming <murrayc@murrayc.com> | 2006-07-11 18:54:10 +0000 |
---|---|---|
committer | Murray Cumming <murrayc@murrayc.com> | 2006-07-11 18:54:10 +0000 |
commit | e65603a6b697a82f8744d4fcb9159fe4530bfbe6 (patch) | |
tree | 4a4c2da6555e87d05906893cae1320de07c44e8a | |
parent | d1e544089194c55b46e75e1ea41c2e21d534d0f4 (diff) |
2006-07-11 Murray Cumming <murrayc@murrayc.com>
* cairomm/refptr.h: unref(): Only delete the refcount int when the refcount has
reached 0, instead of deleting it every time. Thanks valgrind.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | cairomm/refptr.h | 6 |
2 files changed, 8 insertions, 3 deletions
@@ -1,5 +1,10 @@ 2006-07-11 Murray Cumming <murrayc@murrayc.com> + * cairomm/refptr.h: unref(): Only delete the refcount int when the refcount has + reached 0, instead of deleting it every time. Thanks valgrind. + +2006-07-11 Murray Cumming <murrayc@murrayc.com> + * cairomm/refptr.h: From-C-object Constructor: Added documentation explaining how/when to use it and when to do an extra reference(). This will help us, though it should rarely be necessary for an application developer to understand diff --git a/cairomm/refptr.h b/cairomm/refptr.h index 608a0e3..b0ee3d5 100644 --- a/cairomm/refptr.h +++ b/cairomm/refptr.h @@ -2,7 +2,7 @@ #ifndef _cairo_REFPTR_H #define _cairo_REFPTR_H -/* $Id: refptr.h,v 1.4 2006-07-11 17:16:21 murrayc Exp $ */ +/* $Id: refptr.h,v 1.5 2006-07-11 18:54:10 murrayc Exp $ */ /* Copyright 2005 The cairomm Development Team * @@ -206,10 +206,10 @@ void RefPtr<T_CppObject>::unref() delete pCppObject_; pCppObject_ = 0; } - } - delete pCppRefcount_; + delete pCppRefcount_; pCppRefcount_ = 0; + } } } |