Ref is used for reference count management. More...
Inherited by __JSDownloaderDelegator [private], Acceleration, ActionManager, Animation, Animation3D, AnimationCache, AnimationCurve< componentSize >, AnimationFrame, Bone3D, BundleReader, CameraBackgroundBrush, Configuration, Director, Event, EventDispatcher, EventListener, AudioEngineImpl, FrameBuffer, RenderTargetBase, AssetsManagerEx, Manifest, GLProgram, GLProgramCache, GLProgramState, GLView, Grabber, GridBase, GroupCommandManager, IndexBuffer, LuaStack, Mesh, MeshIndexData, MeshSkin, MeshVertexData, HttpRequest, HttpResponse, SIOClient, Node, Particle3DAffector, Particle3DEmitter, Particle3DRender, Physics3DConstraint, Physics3DObject, Physics3DShape, Physics3DWorld, PhysicsShape, PointArray, Primitive, PUBehaviour, PUDynamicAttribute, PUEventHandler, PUMaterial, PUObserver, PUParticle3DBeamVisualData, PURibbonTrailVisualData, RenderState, RenderState::StateBlock, Scheduler, ScriptHandlerEntry, Skeleton3D, SpriteFrame, SpriteFrameCache, Texture2D, TextureAtlas, TextureCache, TMXObjectGroup, Touch, LayoutParameter, RichElement, VertexAttribBinding, VertexBuffer, VertexData, MinXmlHttpRequest, and SimpleRunLoop.
Public Member Functions | |
| void | retain () |
| Retains the ownership. More... | |
| local | retain () |
| Retains the ownership. More... | |
| void | release () |
| Releases the ownership immediately. More... | |
| Ref * | autorelease () |
| Releases the ownership sometime soon automatically. More... | |
| unsigned int | getReferenceCount () const |
| Returns the Ref's current reference count. More... | |
| local | getReferenceCount () |
| Returns the Ref's current reference count. More... | |
| virtual | ~Ref () |
| Destructor. | |
Public Attributes | |
| unsigned int | _ID |
| object id, ScriptSupport need public _ID | |
| local | _ID |
| object id, ScriptSupport need public _ID | |
| int | _luaID |
| Lua reference id. | |
| local | _luaID |
| Lua reference id. | |
| void * | _scriptObject |
| scriptObject, support for swift | |
| local | _scriptObject |
| scriptObject, support for swift | |
| bool | _rooted |
| When true, it means that the object was already rooted. | |
| local | _rooted |
| When true, it means that the object was already rooted. | |
| bool | _scriptOwned |
| The life of the object is scrolled by the scripting engine. More... | |
| local | _scriptOwned |
| The life of the object is scrolled by the scripting engine. More... | |
Ref is used for reference count management.
If a class inherits from Ref, then it is easy to be shared in different places.
| void retain | ( | ) |
Retains the ownership.
This increases the Ref's reference count.
| local retain | ( | ) |
Retains the ownership.
This increases the Ref's reference count.
| void release | ( | ) |
| local release | ( | ) |
| Ref* autorelease | ( | ) |
| unsigned int getReferenceCount | ( | ) | const |
| bool _scriptOwned |
The life of the object is scrolled by the scripting engine.
When the object is controlled by the scripting engine some additional logic is performed, like Rooting/Unrooting the object when retain/release is called.
| local _scriptOwned |
The life of the object is scrolled by the scripting engine.
When the object is controlled by the scripting engine some additional logic is performed, like Rooting/Unrooting the object when retain/release is called.