Merge pull request #2340 from Fox-McCloud/dereferencing

More Garbage Collection Fixes
This commit is contained in:
TheDZD
2015-10-11 16:09:06 -04:00
3 changed files with 28 additions and 5 deletions
@@ -35,9 +35,11 @@
update_icon()
/obj/machinery/portable_atmospherics/Destroy()
disconnect()
qdel(air_contents)
air_contents = null
qdel(holding)
holding = null
return ..()
/obj/machinery/portable_atmospherics/update_icon()
@@ -71,7 +73,7 @@
connected_port = null
return 1
/obj/machinery/portable_atmospherics/portableConnectorReturnAir()
return air_contents
+4 -3
View File
@@ -141,7 +141,8 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
/obj/machinery/hologram/holopad/proc/clear_holo()
// hologram.set_light(0)//Clear lighting. //handled by the lighting controller when its ower is deleted
del(hologram)//Get rid of hologram.
qdel(hologram)//Get rid of hologram.
hologram = null
if(master.holo == src)
master.holo = null
master = null//Null the master, since no-one is using it now.
@@ -222,9 +223,9 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
qdel(src)
return
/obj/machinery/hologram/Destroy()
/obj/machinery/hologram/holopad/Destroy()
if(hologram)
src:clear_holo()
clear_holo()
return ..()
/*
+20
View File
@@ -71,6 +71,26 @@
spacepods_list += src
/obj/spacepod/Destroy()
qdel(equipment_system)
equipment_system = null
qdel(battery)
battery = null
qdel(cabin_air)
cabin_air = null
qdel(internal_tank)
internal_tank = null
qdel(pr_int_temp_processor)
pr_int_temp_processor = null
qdel(pr_give_air)
pr_give_air = null
qdel(ion_trail)
ion_trail = null
if(occupant)
occupant.forceMove(get_turf(src))
occupant = null
if(occupant2)
occupant2.forceMove(get_turf(src))
occupant2 = null
spacepods_list -= src
return ..()