There are some procs in DM which add hidden internal references to objects, and said references in turn prevent graceful garbage collection. Specifically this applies to walk procs and perhaps some others that I'm not aware of. This little tidbit is not mentioned anywhere relevant and on large worlds, where a mishandled Del() call can take up to 3 seconds to complete, is a pain to deal with manually.
As such, it might be worth having these internal references clean themselves up properly. It would require 1 pointer per atom/movable (actor to subject) and 1 pointer per atom (subject to actor). Or, to save space, two associative lists for this. The latter would probably be much more memory optimal, as walk is not used that often, when speaking relatively.
As to why specifically handle these procs, instead of just adding better GC everywhere? Because it's easier and this is a very snide issue in my opinion. If their creation and handling is abstracted behind walk and other procs, then their clean-up should also be abstracted. It's also kind of silly, having to write MSVC/modern C style wrappers for old, unsafe functions (think sprintf_s).
Dec 9 2017, 4:41 am