this bug was introduced recently. it caused RefBase's weakref_impl
structure to be leaked for every RefBase object (about 20 bytes).
Change-Id: Ia9b155fbfa643ef72cfb8129e96260a3b806a78c
* 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.
This adds a destroy() virtual on RefBase which
sublasses can implement. destroy() is called
in lieu of the destructor whenthe last strong
ref goes away.
Bug: 4483050
Change-Id: I8cbf6044a6fd3f01043a45592b5a60fa1e5fade2
Under Fedora 15 Beta, gcc 4.6.0 warns:
frameworks/base/libs/utils/RefBase.cpp: In member function
‘void android::RefBase::weakref_type::trackMe(bool, bool)’:
frameworks/base/libs/utils/RefBase.cpp:483:67: error: passing
‘const android::RefBase::weakref_impl’ as ‘this’ argument of
‘void android::RefBase::weakref_impl::trackMe(bool, bool)’
discards qualifiers [-fpermissive]
trackMe is not a const function, so don't use const in the static_cast
to a weakref_impl pointer.
Change-Id: I3c9ba73eb127985f5f54197ffecf2939c50f632c