Goonstation 13 - Modules - Types

_std/weakref.dm

/proc/get_weakref Gets a weak reference to the given datum. This is a basically a reference that will not prevent garbage collection of the datum. Useful when you don't want to "own" the datum in question. For example a mob holding a reference to its trinket. In that case it doesn't make sense to prevent garbage collection of the trinket. If the trinket gets destroyed in-game we are fine if this weak reference to the trinket turns to null.