1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-12 13:20:55 +00:00

Add NOTIFICATION_PREDELETE_CLEANUP notification

New notification sent after `NOTIFICATION_PREDELETE` to let Objects cleanup at the very end, it should be the last notification sent.
This commit is contained in:
Raul Santos
2023-10-20 13:43:42 +02:00
parent f8818f85e6
commit 9750e49c57
3 changed files with 20 additions and 10 deletions

View File

@@ -198,6 +198,7 @@ bool Object::_predelete() {
notification(NOTIFICATION_PREDELETE, true);
if (_predelete_ok) {
_class_name_ptr = nullptr; // Must restore, so constructors/destructors have proper class name access at each stage.
notification(NOTIFICATION_PREDELETE_CLEANUP, true);
}
return _predelete_ok;
}