onDealloc

abstract fun onDealloc()

Invoked whenever a pooled object is no longer in use. This function is primarily used to clear out any sensitive information or potential memory leaks regarding byte buffers. This function should not fully reset objects, particularly primitives, as there is a chance a given pooled object never gets re-utilized and the garbage collector ends up picking it up. In such cases, it is more beneficial to do the resetting of properties during the onAlloc, to ensure no work is 'wasted'.