Legal Notice, Privacy Policy

Impressum, Datenschutzerklärung

Cerberus X Documentation

Interface IOnPoolAllocate

When implemented by a class pools will automatically call OnPoolAllocate when an object gets allocated. More...

Declarations

Methods
OnPoolAllocate : Void () Will be called when an object gets allocated by a pool using the Pool.Allocate method.

Detailed Discussion

When implemented by a class pools will automatically call OnPoolAllocate when an object gets allocated.

See also: IOnPoolFree


Methods Documentation

Method OnPoolAllocate : Void ()

Will be called when an object gets allocated by a pool using the Pool.Allocate method.

Example
Import brl.pool

Class Actor Implements IOnPoolAllocate
Method OnPoolAllocate:Void()
Print( "A new actor appeared on the stage." )
End
End

Function Main:Int()
Local actorPool := New Pool<Actor>

' create a new actor object
Local actor := actorPool.Allocate()
End