Open dlangBugzillaToGithub opened 14 years ago
Even worse GC lock/unlock aren't parts of a druntime user API so one have to use ugly things like calling addRange/removeRange to ensure the memory will not be collected.
One can use this implementation for now:
http://denis-sh.bitbucket.org/unstandard/unstd.memory.weakref.html
A proposal to add library implementation without runtime changes:
http://forum.dlang.org/thread/l3dj7b$2tvc$1@digitalmars.com
Even in Java Weak references solve about as much problems as they introduce. But a library based solution could indeed come in handy.
nfxjfg reported this on 2010-05-02T20:55:00Z
Transfered from https://issues.dlang.org/show_bug.cgi?id=4151
CC List
Description