do you mean `onBeforeDestroy`?