Profile results (total time)
Proc Name Self CPU Total CPU Real Time Calls
--------------------------------------------------------------- --------- --------- --------- ---------
/obj/projectile/Del 0.565 292.930 889.350 51743
/atom/movable/Del 210.276 210.592 210.670 55285
Del()
if(has_effect) // each effect has it's own dedeletion method, sometimes just setting has_effect = 0, then calling Del()
effect()
else
if(parts.len) // i use parts for trails of these projectiles.
for(var/A in parts)
del A
if(loc_null)
loc_null = 1
loc = null
else
..()
The title says it all. Right now i'm working on a project wiwhich uses a lot of temporarily places objects.
The method i'm using to "delete" these objects is posted above. It actually sets the object to null first, then deletes it the next time the Del() process is called(Garbage Collecting?)
However this is taking up quite a bit of CPU, is there another better way to do this?
There's a huge glaring logic error here. However, that doesn't matter, because you really don't need it at all (I have no idea what you're hoping to accomplish with it) and should just replace the whole thing with a simple ..()