Citrus-Engine
Citrus-Engine copied to clipboard
selectively destroying an object from the pooling system
or just reducing the pool size is not easily doable as of now. It should be clearly available for better memory management (instead of having to clear everything and recreate a pool mid state for example)
The current implementation of PoolObject doesn't even make use of the main feature/purpose of a DoublyLinkedList. It is even weird as it extends DoublyLinkedList and contains a DoublyLinkedList as a property.
A cleaner implementation :
two linked lists (http://jacksondunstan.com/articles/1288) and get rid of the "data" and "node" arguments the user has to deal with. And that would help just destroying single pool or active elements. since the current implementation is too dirty.