summaryrefslogtreecommitdiffstats
path: root/libs/rs/rsObjectBase.h
diff options
context:
space:
mode:
Diffstat (limited to 'libs/rs/rsObjectBase.h')
-rw-r--r--libs/rs/rsObjectBase.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/libs/rs/rsObjectBase.h b/libs/rs/rsObjectBase.h
index 7761e49..ca7acda 100644
--- a/libs/rs/rsObjectBase.h
+++ b/libs/rs/rsObjectBase.h
@@ -47,6 +47,16 @@ public:
mRef = NULL;
}
+ ObjectBaseRef(const ObjectBaseRef &ref) {
+ mRef = ref.get();
+ mRef->incRef();
+ }
+
+ ObjectBaseRef(T *ref) {
+ mRef = ref;
+ ref->incRef();
+ }
+
~ObjectBaseRef() {
clear();
}
@@ -77,9 +87,6 @@ public:
protected:
T * mRef;
-private:
- ObjectBaseRef(const ObjectBaseRef &) {};
-
};