Axmol Engine 2.4.0-258ceca
|
A pool for managing autorelease objects. More...
#include <AutoreleasePool.h>
Public Member Functions | |
AutoreleasePool () | |
AutoreleasePool (std::string_view name) | |
Create an autorelease pool with specific name. | |
~AutoreleasePool () | |
@js NA @lua NA | |
void | addObject (Object *object) |
Add a given object to this autorelease pool. | |
void | clear () |
Clear the autorelease pool. | |
bool | contains (Object *object) const |
Checks whether the autorelease pool contains the specified object. | |
void | dump () |
Dump the objects that are put into the autorelease pool. | |
A pool for managing autorelease objects.
@js NA
AutoreleasePool | ( | ) |
AutoreleasePool | ( | std::string_view | name | ) |
Create an autorelease pool with specific name.
This name is useful for debugging.
name | The name of created autorelease pool. |
void addObject | ( | Object * | object | ) |
Add a given object to this autorelease pool.
The same object may be added several times to an autorelease pool. When the pool is destructed, the object's Object::release()
method will be called the same times as it was added.
object | The object to be added into the autorelease pool. @js NA @lua NA |
void clear | ( | ) |
Clear the autorelease pool.
It will invoke each element's release()
function.
@js NA @lua NA
bool contains | ( | Object * | object | ) | const |
Checks whether the autorelease pool contains the specified object.
object | The object to be checked. |
void dump | ( | ) |
Dump the objects that are put into the autorelease pool.
It is used for debugging.
The result will look like: Object pointer address object id reference count
@js NA @lua NA