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

Package | com.godpaper.as3.model.pools
Class | public class BlueChessPiecesPool
Inheritance | BlueChessPiecesPool 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 Properties

| Property | Defined By
--- | --- | ---
|  | initialized : Boolean [static] [read-only] | BlueChessPiecesPool

Public Methods

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

Property Detail

initialized | property

`initialized:Boolean` [read-only]

Implementation
`public static function get initialized():Boolean`
Method Detail

dispose | () | method

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

Parameters

| `disposed:ChessPiece`

get | () | method |

`public static function get():ChessPiece`

Returns

| `ChessPiece`

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