3 ms·
> One approach is to provide a mechanism for cleanup that doesn't require the object to still be alive. Java has phantom references for this: Java has pretty m
by masklinn 6y ago
> One approach is to provide a mechanism for cleanup that doesn't require the object to still be alive. Java has phantom references for this:
Java has pretty much deprecated finalizers due to how non-deterministic their run is. Modern java uses try-with-resources blocks which… are the exact same thing as Python's with.