cocos2d-x  3.3
 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 ()
 NA NA More...
 
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...
 

Constructor & Destructor Documentation

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

NA NA

AutoreleasePool ( const std::string &  name)

Create an autorelease pool with specific name.

This name is useful for debugging.

NA NA

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. NA NA
void clear ( )

Clear the autorelease pool.

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

bool contains ( Ref object) const

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


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