From bd3696523ba48349661f68e052158b26eb2e5b29 Mon Sep 17 00:00:00 2001 From: Fox-McCloud Date: Sun, 20 Sep 2015 22:40:13 -0400 Subject: [PATCH 1/2] GC a few Datums --- code/datums/material_container.dm | 3 ++- code/datums/wires/wires.dm | 3 ++- code/game/machinery/recycler.dm | 5 +++++ code/game/objects/structures/musician.dm | 3 ++- code/modules/power/powernet.dm | 3 ++- code/modules/research/protolathe.dm | 1 + 6 files changed, 14 insertions(+), 4 deletions(-) diff --git a/code/datums/material_container.dm b/code/datums/material_container.dm index 8f84812e49e..5de0b6e1644 100644 --- a/code/datums/material_container.dm +++ b/code/datums/material_container.dm @@ -41,7 +41,8 @@ /datum/material_container/Destroy() owner = null - return ..() + ..() + return QDEL_HINT_QUEUE //For inserting an amount of material /datum/material_container/proc/insert_amount(amt, material_type = null) diff --git a/code/datums/wires/wires.dm b/code/datums/wires/wires.dm index 2055c2790b7..4d0ec45eecb 100644 --- a/code/datums/wires/wires.dm +++ b/code/datums/wires/wires.dm @@ -48,7 +48,8 @@ var/list/wireColours = list("red", "blue", "green", "black", "orange", "brown", /datum/wires/Destroy() holder = null - return ..() + ..() + return QDEL_HINT_QUEUE /datum/wires/proc/GenerateWires() var/list/colours_to_pick = wireColours.Copy() // Get a copy, not a reference. diff --git a/code/game/machinery/recycler.dm b/code/game/machinery/recycler.dm index 2f2e2a9dbf8..6bb538b349f 100644 --- a/code/game/machinery/recycler.dm +++ b/code/game/machinery/recycler.dm @@ -27,6 +27,11 @@ var/const/SAFETY_COOLDOWN = 100 RefreshParts() update_icon() +/obj/machinery/recycler/Destroy() + qdel(materials) + materials = null + return ..() + /obj/machinery/recycler/RefreshParts() var/amt_made = 0 var/mat_mod = 0 diff --git a/code/game/objects/structures/musician.dm b/code/game/objects/structures/musician.dm index 3d3adcf9339..43a21f795f9 100644 --- a/code/game/objects/structures/musician.dm +++ b/code/game/objects/structures/musician.dm @@ -21,7 +21,8 @@ /datum/song/Destroy() instrumentObj = null - return ..() + ..() + return QDEL_HINT_QUEUE // note is a number from 1-7 for A-G // acc is either "b", "n", or "#" diff --git a/code/modules/power/powernet.dm b/code/modules/power/powernet.dm index 1fe2737d31b..5815aacb9fe 100644 --- a/code/modules/power/powernet.dm +++ b/code/modules/power/powernet.dm @@ -29,7 +29,8 @@ M.powernet = null powernets -= src - return ..() + ..() + return QDEL_HINT_QUEUE //Returns the amount of excess power (before refunding to SMESs) from last tick. //This is for machines that might adjust their power consumption using this data. diff --git a/code/modules/research/protolathe.dm b/code/modules/research/protolathe.dm index 0bac36ea35b..ae0bfd6ce7d 100644 --- a/code/modules/research/protolathe.dm +++ b/code/modules/research/protolathe.dm @@ -62,6 +62,7 @@ Note: Must be placed west/left of and R&D console to function. /obj/machinery/r_n_d/protolathe/Destroy() qdel(materials) + materials = null return ..() /obj/machinery/r_n_d/protolathe/RefreshParts() From 810784c8acedabcf841faf18ff88dd8c0c08f85e Mon Sep 17 00:00:00 2001 From: Fox-McCloud Date: Mon, 21 Sep 2015 01:17:12 -0400 Subject: [PATCH 2/2] qdel() dem powernets --- code/modules/power/powernet.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/power/powernet.dm b/code/modules/power/powernet.dm index 5815aacb9fe..29d8af7a12f 100644 --- a/code/modules/power/powernet.dm +++ b/code/modules/power/powernet.dm @@ -52,7 +52,7 @@ cables -= C C.powernet = null if(is_empty())//the powernet is now empty... - del(src)///... delete it - qdel + qdel(src)///... delete it - qdel //add a cable to the current powernet //Warning : this proc DON'T check if the cable exists @@ -72,7 +72,7 @@ nodes -=M M.powernet = null if(is_empty())//the powernet is now empty... - del(src)///... delete it - qdel + qdel(src)///... delete it - qdel //add a power machine to the current powernet