Packagecom.desuade.utils
Classpublic class MultiPool
InheritanceMultiPool Inheritance Object

Language Version : ActionScript 3
Since : 09.06.2010
Runtime Versions : AIR 1.0, Flash Player 9.0.0

This stores pools and manages objects based on multiple classes.



Public Properties
 PropertyDefined By
  expandSize : int
The starting size and rate of expansion of the object pool
MultiPool
Public Methods
 MethodDefined By
  
MultiPool(clean:Function, expandSize:int = 50)
This creates a new MultiPool.
MultiPool
  
checkInClass(class:Class, item:*):void
This checks in the object to the specified class pool.
MultiPool
  
checkOutClass(class:Class):*
This checks out the object to the specified class pool.
MultiPool
  
This removes all the object pools for classes to free up memory.
MultiPool
Property Detail
expandSizeproperty
public var expandSize:int

The starting size and rate of expansion of the object pool

Constructor Detail
MultiPool()Constructor
public function MultiPool(clean:Function, expandSize:int = 50)

This creates a new MultiPool.

Parameters
clean:Function — This is the function to clean all the objects with.
 
expandSize:int (default = 50) — The size of each expansion for the object pool
Method Detail
checkInClass()method
public function checkInClass(class:Class, item:*):void

This checks in the object to the specified class pool.

Parameters

class:Class — The class of object.
 
item:* — The object to check in.

checkOutClass()method 
public function checkOutClass(class:Class):*

This checks out the object to the specified class pool.

Parameters

class:Class — The class of objects to create.

Returns
* — The new object.
purgeAllClasses()method 
public function purgeAllClasses():void

This removes all the object pools for classes to free up memory. Only call this after all objects are done and/or purged. Use with caution.