ID:155740
 
What is the best way to do this? Because the Del() proc is not working for me, it seems to be un-usable from the looks of things.
If an object is deleted then you have some script to delete it. For example :

del src  // Delete is not a proc by the way.


So if you have that then I don't understand why you wouldn't just put the "Action" before the deletion?
In response to Kyle_ZX
I'm sorry, shouldn't have made a pointless, mean post.
Del() would work fine, there may just be a possibility that your atom isn't being deleted when you believe it should be, due to referencing.

For instance, the atom could be referenced in some list deep somewhere you've forgotten about, or some contents list. I'd investigate this before continuing, as it constitutes a memory leak in your code.
In response to Kyle_ZX
The deletion may not be programmatically instigated, the object may just have no more references to it, and gets cleaned up by the BYOND VM.

This is in fact the preferable way to delete objects, I believe, as the BYOND VM knows by reference counting that it doesn't need to force any variables to null so it just needs to clean up the memory and not look over any references. It can also clean up the object's memory locations in it's own time, when it is less busy dealing with user interactions, allowing it to improve the VM's response to user requests by delaying actual deletion while CPU intense / time-sensitive user requests are in force.

Del() is designed to be that programmatic catch-all, to allow the programmer to perform an action on delete, regardless of how the delete happened and who did the deleting.
In response to OrangeWeapons
OrangeWeapons wrote:
lol...

You provided us with a one line description. You get back what you put out.