Axmol Engine 2.4.0-258ceca
|
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. | |
Object * | autorelease () |
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. | |
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
|
virtual |
Destructor.
@js NA @lua NA
void retain | ( | ) |
Retains the ownership.
This increases the Object's reference count.
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.
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.
unsigned int getReferenceCount | ( | ) | const |