I have an application with some objects (of type BaseTexture
) on which an explicit destroy
function should be called when they aren't of any more use. Otherwise they might leak some memory. This should be done before they are garbage collected (and obviously only can be done then), but it doesn't always happen.
In Java I would detect and log this using finalize
, but such a thing does not exist in Javascript.
Can I detect this in Chrome (or in another browser)? I don't really care if it's buggy, requires flags, can only log a simple message, etc, as long as it works during development. The fact that a BaseTexture
has been destroyed can be retrieved from its source
property.