Axmol Engine 2.4.0-258ceca
Loading...
Searching...
No Matches
Object Class Reference

Object is used for reference count management. More...

#include <Object.h>

Inherited by AnimationCurve< 3 >, AnimationCurve< 4 >, Acceleration, ActionManager, Animation, Animation3D, AnimationCurve< componentSize >, AnimationFrame, , Bone3D, BundleReader, CameraBackgroundBrush, Event, EventDispatcher, EventListener, GLView, GridBase, , Image, Material, Mesh, MeshIndexData, MeshSkin, MeshVertexData, Node, , PointArray, RenderState, Scheduler, ScriptHandlerEntry, Skeleton3D, SpriteFrame, TMXObjectGroup, TMXTileAnimManager, TMXTileAnimTask, Technique, Texture2D, TextureAtlas, TextureCache, TextureCube, Touch, VertexAttribBinding, Buffer, CommandBuffer, DepthStencilState, Program, RenderPipeline, , and ShaderModule.

Public Member Functions

void retain ()
 Retains the ownership.
 
void release ()
 Releases the ownership immediately.
 
Objectautorelease ()
 Releases the ownership sometime soon automatically.
 
unsigned int getReferenceCount () const
 Returns the Object's current reference count.
 
virtual ~Object ()
 Destructor.
 

Public Attributes

unsigned int _ID
 object id, ScriptSupport need public _ID
 
int _luaID
 Lua reference id.
 

Detailed Description

Object is used for reference count management.

If a class inherits from Object, then it is easy to be shared in different places. @js NA

Constructor & Destructor Documentation

◆ ~Object()

virtual ~Object ( )
virtual

Destructor.

@js NA @lua NA

Member Function Documentation

◆ retain()

void retain ( )

Retains the ownership.

This increases the Object's reference count.

See also
release, autorelease @js NA

◆ release()

void release ( )

Releases the ownership immediately.

This decrements the Object's reference count.

If the reference count reaches 0 after the decrement, this Object is destructed.

See also
retain, autorelease @js NA

◆ autorelease()

Object * autorelease ( )

Releases the ownership sometime soon automatically.

This decrements the Object's reference count at the end of current autorelease pool block.

If the reference count reaches 0 after the decrement, this Object is destructed.

Returns
The Object itself.
See also
AutoreleasePool, retain, release @js NA @lua NA

◆ getReferenceCount()

unsigned int getReferenceCount ( ) const

Returns the Object's current reference count.

Returns
The Object's reference count. @js NA

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