AcDbObject and Database Notification Events

When you receive erased() notification on a database object, the object is marked as erased but is still part of the database. When you receive unappended() notification, the object has been marked unappended and is not part of the database unless it is reappended. The goodbye() notification on an object is sent just before it goes away completely. This notification signals that the object is about to be removed from the database and deleted from memory.

You may want to remove your reactor from an object when you receive erased() or unappended() notification. However, if you remove the reactor at this point, you won't receive reappended() or unerased() notification for that object. To monitor these events, use the equivalent notifications on the database, not just the object:

AcDbDatabaseReactor::objectErased()
AcDbDatabaseReactor::objectUnappended()
AcDbDatabaseReactor::objectReappended()