Just that.
The Java API documentation may provide a good starting point as to what weak references should be able to do:
http://java.sun.com/javase/7/docs/api/java/lang/ref/WeakReference.html
Note that finalizers and the "hidden" rt_attach.../detach... functions are highly unsafe and hard to get right. As an example what can go wrong if users try to implement their own weak references, see bug 4150.
Comment #1 by verylonglogin.reg — 2013-03-16T05:06:59Z
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.
Comment #2 by verylonglogin.reg — 2013-10-08T02:58:32Z