![]() |
Destructor Function
I'd like it if there was a destruct() function that would be called before the engine destroys an object whether it be by destroy() or by garbage collection or anything else.
Naturally since its a function the engine would be waiting for destruct() to return before actually destroying the object. Basically I want to do some cleanup for things that might have objects belonging solely to it. At the moment I use a System.destroyobject(object/objectname); that is checking if the object exists before calling destroy() and also calling destruct() instead of destroy() where destruct() is cleaning up before destroying the object. |
Or something like onDestroy?
|
Quote:
|
I totally support this. Nice idea :D I dont have any use for it right now, but I'm almost 100% sure I will need that later.
Also, I know its off-topic, but please dont forget the 5 seconds delayed observer function Stefan :P |
Yeah, something like onDestroy would be good but it should be called, not triggered so that the object isn't destroyed until after the function execution.
|
Yes like the onPlayerLogout kind of, but would only work in the script of the object itself
|
Quote:
|
I totally support this idea, there are many practical uses.
|
BUMP!
I would like to have this feature added. |
Bump. So many practical uses for this!
|
| All times are GMT +2. The time now is 05:55 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.