4 ms·
Bad idea. Weak reference can be removed at the same time. You're supposed to let the PhantomReference contain the underlying thing that you want to delete when
by immibis 2y ago
Bad idea. Weak reference can be removed at the same time. You're supposed to let the PhantomReference contain the underlying thing that you want to delete when the object is GCed, such as a native handle.