|
Axmol 3.0.0-89d6d9a
|
Object is used for reference count management. More...
#include <Object.h>
Inherited by AnimationCurve< 3 >, AnimationCurve< 4 >, ActionManager, Animation, Animation3D, AnimationCurve< componentSize >, AnimationFrame, , Bone3D, CameraBackgroundBrush, Collider2D, Event, EventDispatcher, EventListener, GridBase, , Image, Material, Mesh, MeshIndexData, MeshSkin, MeshVertexData, Node, , PhysicsWorld3D, PointArray, RenderState, RenderTexturePass, RenderViewCore, Scheduler, ScriptHandlerEntry, Skeleton3D, SpriteFrame, TMXObjectGroup, TMXTileAnimManager, TMXTileAnimTask, Technique, Texture2D, TextureAtlas, TextureCache, TextureCube, VertexInputBinding, , Buffer, ComputePipeline, DepthStencilState, GraphicsContext, GraphicsPipeline, Program, ProgramState, RenderTarget, ShaderModule, and Texture.
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. | |
| uint64_t | getObjectID () const noexcept |
| Returns the process-local diagnostic identifier assigned at construction. | |
| virtual | ~Object () |
| Destructor. | |
Object is used for reference count management.
If a class inherits from Object, then it is easy to be shared in different places.
|
virtual |
Destructor.
@lua NA
| void retain | ( | ) |
| 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 | ( | ) |
| unsigned int getReferenceCount | ( | ) | const |
|
inlinenoexcept |
Returns the process-local diagnostic identifier assigned at construction.
This value is for logging and debugging only. It is not an object identity key and must not be used for ownership, lifetime, or scripting registries.