Alias deref -> unref. This allows Skia objects to be held by WTF::RefPtr
smart pointers without need for another smart pointer type. Note that the semantics of SkRefCnt match those WTF expects. In particular, newly created objects have refcount 1 and objects are deallocated at refcount 0. This seems like a better fit than the AddRef/Release alises which exist for scoped_ptr (but seem unused). BUG=254509 R=reed@google.com Author: jbroman@chromium.org Review URL: https://chromiumcodereview.appspot.com/17880003 git-svn-id: http://skia.googlecode.com/svn/trunk@9784 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
4a551d49cf
commit
39095b9d14
@ -81,6 +81,11 @@ public:
|
||||
*/
|
||||
void Release() { this->unref(); }
|
||||
|
||||
/**
|
||||
* Alias for unref(), for compatibility with WTF::RefPtr.
|
||||
*/
|
||||
void deref() { this->unref(); }
|
||||
|
||||
protected:
|
||||
/**
|
||||
* Allow subclasses to call this if they've overridden internal_dispose
|
||||
|
Loading…
Reference in New Issue
Block a user