Numbered Steps to Reproduce Problem:
1) Create an object that has no references to it. (make_thing())
2) Use a mob (or client) verb to attempt to GC the object by setting it loc to null. (delete_thing_mob())
3) Observe that it fails to do so (check_ref() or list_things())
4) Repeat the experiment using an identical object verb (delete_thing_obj())
5) Observe that it successfully does so
Optionally:
1) Attempt to add A = null at the end of the proc to no success.
2) Attempt to add return at the end of the proc to no success.
3) Use input() instead of an argument to get the object to no success.
4) Replace mob verb with client verb to get the same result.
5) Forcefully delete a mob and observe that the object is now GC'ed.
Code Snippet (if applicable) to Reproduce Problem:
/mob/verb/make_thing()
var/obj/O = new /obj/thing(loc)
world << "[O] made, \ref[O]"
/mob/verb/delete_thing_mob(var/atom/movable/A as null|obj in world)
world << "MD: Ref was \ref[A]"
A.loc = null
/mob/verb/check_ref(var/R as text)
var/atom/A = locate(R)
if(A)
world << "Exists, [A]"
else
world << "Does not exist"
/obj/thing
name = "Thing"
/obj/thing/verb/delete_thing_obj()
set src in view()
world << "OD: Ref was \ref[src]"
loc = null
/mob/verb/list_things()
world << "Listing things"
for(var/atom/movable/A)
world << "[A], \ref[A]"
world << "Done"
Expected Results: Object will be GC'ed as there are no references to it.
Actual Results: Object is left hanging.
Does the problem occur:
Every time? Or how often? Every time.
In other games? It originally occurred in Space Station 13.
In other user accounts? Yes.
On other computers? Yes.
When does the problem NOT occur? When you use object verbs, for example.
Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)
Workarounds: Not using mob verbs for objects that need to be GC'ed.