diff options
author | Simon Wilson <simonwilson@google.com> | 2011-05-24 17:29:12 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2011-05-24 17:29:12 -0700 |
commit | b9783b49f4727a0365f2297bb903db8682855adf (patch) | |
tree | 0d4831587eed29e6e2366280543ed0f226051807 /include | |
parent | 10b364b4bea8537f955bbbb8b9b40061264b29c9 (diff) | |
parent | c9cd2387b6938a6fbefc731d2177902266f2a130 (diff) | |
download | frameworks_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.h | 9 |
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, |