cocos2d-x  3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Ref Class Reference

#include <CCRef.h>

Inheritance diagram for Ref:
__Array __Bool __Dictionary __Double __Float __Integer __NotificationCenter __Set __String Action ActionManager Animation AnimationCache AnimationFrame Component Configuration Director Event EventDispatcher EventListener Color3bObject Invocation Font FontAtlas GLProgram GLView GLView GLView GLView GLView Grabber GridBase GroupCommandManager Image LuaStack MaterialManager HttpRequest HttpResponse SIOClient Node NotificationObserver PointArray Profiler ProfilingTimer ScheduleHandlerDelegate Scheduler ScriptHandlerEntry ShaderCache SpriteFrame SpriteFrameCache Texture2D TextureAtlas TextureCache Timer TMXLayerInfo TMXMapInfo TMXObjectGroup TMXTilesetInfo Touch LayoutParameter RichElement CCBAnimationManager CCBKeyframe CCBReader CCBSequence CCBSequenceProperty NodeLoader NodeLoaderLibrary ActionFrame ActionFrameEasing ActionManagerEx ActionNode ActionObject AnimationData ArmatureData ArmatureDataManager ArmatureMovementDispatcher BaseData BaseTriggerAction BaseTriggerCondition ColliderBody ColliderDetector ContourData DataReaderHelper DecorativeDisplay DisplayData DisplayManager GUIReader MovementBoneData MovementData ProcessBase TextureData TriggerObj WidgetPropertiesReader WidgetReader LuaMinXmlHttpRequest

Public Member Functions

void retain ()
 Retains the ownership. More...
void release ()
 Release the ownership immediately. More...
Refautorelease ()
 Release the ownership sometime soon automatically. More...
unsigned int getReferenceCount () const
 Returns the Ref's current reference count. More...
virtual ~Ref ()

Protected Member Functions

 Ref ()
 Constructor. More...

Protected Attributes

unsigned int _referenceCount
 count of references More...


class AutoreleasePool

Constructor & Destructor Documentation

Ref ( )


The Ref's reference count is 1 after construction.

virtual ~Ref ( )

Member Function Documentation

Ref* autorelease ( )

Release 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.

The Ref itself.
See Also
AutoreleasePool, retain, release
unsigned int getReferenceCount ( ) const

Returns the Ref's current reference count.

The Ref's reference count.
void release ( )

Release 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
void retain ( )

Retains the ownership.

This increases the Ref's reference count.

See Also
release, autorelease

Friends And Related Function Documentation

friend class AutoreleasePool

Member Data Documentation

unsigned int _referenceCount

count of references

The documentation for this class was generated from the following file: