#include <CCRef.h>
Constructor.
The Ref's reference count is 1 after construction.
Releases the ownership sometime soon automatically.
This descrements the Ref's reference count at the end of current autorelease pool block.
If the reference count reaches 0 after the descrement, this Ref is destructed.
- Returns
- The Ref itself.
- See also
- AutoreleasePool, retain, release
unsigned int getReferenceCount |
( |
| ) |
const |
Returns the Ref's current reference count.
- Returns
- The Ref's reference count.
Releases the ownership immediately.
This decrements the Ref's reference count.
If the reference count reaches 0 after the descrement, this Ref is destructed.
- See also
- retain, autorelease
unsigned int _referenceCount |
|
protected |
The documentation for this class was generated from the following file:
- /Users/guanghui/cocos2d-x-v2/cocos/base/CCRef.h