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

#include <CCRef.h>

Inheritance diagram for Ref:
ActionTimelineData __Array __Bool __Dictionary __Double __Float __Integer __NotificationCenter __Set __String Acceleration Action ActionManager Animation Animation3D AnimationCache AnimationCurve< componentSize > AnimationFrame Bone3D BundleReader Component Configuration Director Event EventDispatcher EventListener Color3bObject Invocation Font FontAtlas GLProgram GLProgramCache GLProgramState GLView GLView GLView GLView GLView Grabber GridBase GroupCommandManager Image LuaStack Mesh MeshSkin HttpRequest HttpResponse SIOClient Node NotificationObserver PhysicsBody PhysicsShape PointArray Profiler ProfilingTimer ScheduleHandlerDelegate Scheduler SpriteFrame SpriteFrameCache Texture2D TextureAtlas TextureCache Timer TMXLayerInfo TMXMapInfo TMXObjectGroup TMXTilesetInfo Touch LayoutManager 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 Frame LuaMinXmlHttpRequest Timeline

Public Member Functions

void retain ()
 Retains the ownership. More...
void release ()
 Releases the ownership immediately. More...
Refautorelease ()
 Releases 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 ( )

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.

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 ( )

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
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: