summaryrefslogtreecommitdiffstats
path: root/include/utils/RefBase.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/utils/RefBase.h')
-rw-r--r--include/utils/RefBase.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/utils/RefBase.h b/include/utils/RefBase.h
index f355087..e88cb29 100644
--- a/include/utils/RefBase.h
+++ b/include/utils/RefBase.h
@@ -120,7 +120,14 @@ public:
protected:
RefBase();
virtual ~RefBase();
-
+
+ // called when the last reference goes away. this is responsible for
+ // calling the destructor. The default implementation just does
+ // "delete this;".
+ // Make sure to never acquire a strong reference from this function. The
+ // same restrictions than for destructors apply.
+ virtual void destroy() const;
+
//! Flags for extendObjectLifetime()
enum {
OBJECT_LIFETIME_WEAK = 0x0001,