cocos2d-x  3.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
AutoreleasePool Class Reference

#include <CCAutoreleasePool.h>

Public Member Functions

 AutoreleasePool ()
 Don't create an auto release pool in heap, create it in stack. More...
 
 AutoreleasePool (const std::string &name)
 Create an autorelease pool with specific name. More...
 
 AutoreleasePool ( var name)
 Create an autorelease pool with specific name. More...
 
 AutoreleasePool ( local name)
 Create an autorelease pool with specific name. More...
 
 ~AutoreleasePool ()
void addObject (Ref *object)
 Add a given object to this pool. More...
 
void clear ()
 Clear the autorelease pool. More...
 
bool contains (Ref *object) const
 Checks whether the pool contains the specified object. More...
 
void dump ()
 Dump the objects that are put into autorelease pool. More...
 
var dump ()
 Dump the objects that are put into autorelease pool. More...
 
local dump ()
 Dump the objects that are put into autorelease pool. More...
 

Constructor & Destructor Documentation

Don't create an auto release pool in heap, create it in stack.

AutoreleasePool ( const std::string &  name)

Create an autorelease pool with specific name.

This name is useful for debugging.

var AutoreleasePool ( var  name)

Create an autorelease pool with specific name.

This name is useful for debugging.

local AutoreleasePool ( local  name)

Create an autorelease pool with specific name.

This name is useful for debugging.

Member Function Documentation

void addObject ( Ref object)

Add a given object to this pool.

The same object may be added several times to the same pool; When the pool is destructed, the object's Ref::release() method will be called for each time it was added.

Parameters
objectThe object to add to the pool.
void clear ( )

Clear the autorelease pool.

Ref::release() will be called for each time the managed object is added to the pool.

bool contains ( Ref object) const

Checks whether the pool contains the specified object.

var contains ( var  object)

Checks whether the pool contains the specified object.

local contains ( local  object)

Checks whether the pool contains the specified object.

void dump ( )

Dump the objects that are put into autorelease pool.

It is used for debugging.

The result will look like: Object pointer address object id reference count

var dump ( )

Dump the objects that are put into autorelease pool.

It is used for debugging.

The result will look like: Object pointer address object id reference count

local dump ( )

Dump the objects that are put into autorelease pool.

It is used for debugging.

The result will look like: Object pointer address object id reference count


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