summaryrefslogtreecommitdiffstats
path: root/libs/utils/RefBase.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix sp<> conversion operator / constructorMathias Agopian2011-02-251-4/+30
| | | | | | | | | | some of the conversion operators were not using the proper pointer type when calling incStrong/decStrong, usually it has no bad consequences, but for some implementation of the ref-counted object it could lead to recording the wrong owner id. Change-Id: If574b9069b8a4cf6e0911a992c8f095aba799995
* Fix some issues with RefBase debugging.Mathias Agopian2011-02-231-70/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | First slipt sp<> out of RefBase into StrongPointer.h so it can be reused more easily and to make it clear that it doesn't require RefBase. Note: the rest of the change only affects the system when DEBUG_REFS is enabled. The main problem we fix here is that the owner id associated with each reference could get out of date when a sp<> or wp<> was moved, for instance when they're used in a Vector< >. We fix this issue by calling into RefBase::moveReferences from a template specialization for sp<TYPE> and wp<TYPE> of the type helpers. RefBase::moveReferences() has then a chance to update the owner ids. There is a little bit of trickery to implement this generically in RefBase, where we need to use a templatized functor that can turn a sp<TYPE>* casted to a void* into a RefBase*. Introduced a new debug option DEBUG_REFS_FATAL_SANITY_CHECKS currently set to 0 by default as there seem to be an issue with sp<ANativeWindow> which trips the sanity checks. Change-Id: I4825b21c8ec47d4a0ef35d760760ae0c9cdfbd7f
* Remove RefBase.h dependency on TextOutput.hMathias Agopian2011-02-221-1/+17
| | | | Change-Id: I72cd6b98ef82b4868fe1c8ec87862cf43fb4ee73
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-0/+534
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-534/+0
|
* Initial ContributionThe Android Open Source Project2008-10-211-0/+534