summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSimon Wilson <simonwilson@google.com>2011-05-24 17:29:12 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2011-05-24 17:29:12 -0700
commitb9783b49f4727a0365f2297bb903db8682855adf (patch)
tree0d4831587eed29e6e2366280543ed0f226051807 /include
parent10b364b4bea8537f955bbbb8b9b40061264b29c9 (diff)
parentc9cd2387b6938a6fbefc731d2177902266f2a130 (diff)
downloadframeworks_base-b9783b49f4727a0365f2297bb903db8682855adf.zip
frameworks_base-b9783b49f4727a0365f2297bb903db8682855adf.tar.gz
frameworks_base-b9783b49f4727a0365f2297bb903db8682855adf.tar.bz2
am c9cd2387: Merge changes I37f0f315,I8cbf6044,Ibb598931,I5262bf11 into gingerbread
* commit 'c9cd2387b6938a6fbefc731d2177902266f2a130': Fix a race that could cause GL commands to be executed from the wrong thread. RefBase subclasses can now decide how they want to be destroyed. Fix a race in SurfaceFlinger that could cause layers to be leaked forever. Fix a race-condtion in SurfaceFlinger that could lead to a crash.
Diffstat (limited to 'include')
-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 c24c0db..1b4a310 100644
--- a/include/utils/RefBase.h
+++ b/include/utils/RefBase.h
@@ -115,7 +115,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,