summaryrefslogtreecommitdiffstats
path: root/include/utils
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2014-05-09 15:27:22 -0700
committerJohn Reck <jreck@google.com>2014-05-09 15:27:22 -0700
commitd83186c444809beaaf181b11c857bc2ab675428e (patch)
treec04fff485e5c37ead2687904879f73d9f7e8b32d /include/utils
parente49e43d4aa201e1bfcf0f6f7dd934ba69b9d18d1 (diff)
downloadsystem_core-d83186c444809beaaf181b11c857bc2ab675428e.zip
system_core-d83186c444809beaaf181b11c857bc2ab675428e.tar.gz
system_core-d83186c444809beaaf181b11c857bc2ab675428e.tar.bz2
Add VirtualLightRefBase
Change-Id: I040db87d9e87ba0584e7e5bdd72f0c319a522fa1
Diffstat (limited to 'include/utils')
-rw-r--r--include/utils/RefBase.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/utils/RefBase.h b/include/utils/RefBase.h
index cbfe13a..8e15c19 100644
--- a/include/utils/RefBase.h
+++ b/include/utils/RefBase.h
@@ -203,6 +203,13 @@ private:
mutable volatile int32_t mCount;
};
+// This is a wrapper around LightRefBase that simply enforces a virtual
+// destructor to eliminate the template requirement of LightRefBase
+class VirtualLightRefBase : public LightRefBase<VirtualLightRefBase> {
+public:
+ virtual ~VirtualLightRefBase() {}
+};
+
// ---------------------------------------------------------------------------
template <typename T>