Have you thought about using weak pointers? Those are already handled
as a special case by the GC.
In your pool, you keep weak references such that if a GC happens and
no real references exist on an object outside of weak references, the
object will be GCed and all weak references will be invalidat
You might want to consider optimizing your memory usage. In time
series data, usually it is best not to keep objects in those arrays
but rather structs. The time serie itself can be an object but keeping
large arrays of small objects is very bad performance wise: you waste
memory due to the interna