Closed MCHSL closed 2 years ago
add strong(er) refs too or is making sure Drop doesn't happen outside of the main thread too hard
Whoops, that took a while longer than I anticipated. Strong references would be a bit of a pain, we'd have to either define datum/Del
which is a massive performance drain, or hook the internal del
machinery and work from there.
When I say strong-ref I just mean a normal byond reference. It could still turn into null, but will keep the reference count above 0
Adds weak values which are weak references to datums. Pass them wherever and then call upgrade() (on the main thread) to retrieve the references value if it hasn't been deleted in the meantime.
Gonna write some tests tomorrow probably.