Legal Notice, Privacy Policy

Impressum, Datenschutzerklärung

Cerberus X Documentation

Interface IOnPoolFree

When implemented by a class pools will automatically call OnPoolFree when an object gets freed. More...

Declarations

Methods
OnPoolFree : Void () Will be called when an object gets freed by a pool using the Pool.Free method.

Detailed Discussion

When implemented by a class pools will automatically call OnPoolFree when an object gets freed.

See also: IOnPoolAllocate


Methods Documentation

Method OnPoolFree : Void ()

Will be called when an object gets freed by a pool using the Pool.Free method.

Example
Import brl.pool

Class Actor Implements IOnPoolFree
Method OnPoolFree:Void()
Print( "An actor has left the stage." )
End
End

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

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

' free the actor
actorPool.Free(actor)
End