Notification function called just before an object is deleted from memory.
The default implementation of this function does nothing. This function can be overridden in custom classes.