GODPAPER | All Packages | All Classes | Index | Frames No Frames |
ChessGasketsPool

Package | com.godpaper.as3.model.pools
Class | public class ChessGasketsPool
Inheritance | ChessGasketsPool Object

Reusing objects reduces the need to instantiate objects, which can be expensive. It also reduces the chances of the garbage collector running, which can slow down your application. The following code illustrates the object pooling technique:

See also

http://help.adobe.com/en_US/as3/mobile/WS948100b6829bd5a6-19cd3c2412513c24bce-8000.html
http://en.wikipedia.org/wiki/Object_pool_pattern

Public Methods

| Method | Defined By
--- | --- | ---
|  | dispose(disposed:ChessGasket):void [static] | ChessGasketsPool
|  | get():ChessGasket [static] | ChessGasketsPool
|  | initialize(maxPoolSize:uint, growthValue:uint):void [static] | ChessGasketsPool

Method Detail

dispose | () | method

`public static function dispose(disposed:ChessGasket):void`

Parameters

| `disposed:ChessGasket`

get | () | method |

`public static function get():ChessGasket`

Returns

| `ChessGasket`

initialize | () | method |

`public static function initialize(maxPoolSize:uint, growthValue:uint):void`

Parameters

| `maxPoolSize:uint`
| `growthValue:uint`

Thu Jan 16 2014, 01:11 PM +08:00