Any object with an on_destroy() method will have that method called prior to the object being reclaimed by the GC.