Notification function called whenever an object has been erased or unerased.
The default implementation of this function does nothing. This function can be overridden in custom classes.