3 ms·
Finalizers are almost inherently a bad idea in garbage-collected languages; the best practice is simply not to use them. If you're trying to do C++-style RAII (
by lmm 13y ago
Finalizers are almost inherently a bad idea in garbage-collected languages; the best practice is simply not to use them. If you're trying to do C++-style RAII (a very good idea!) you want something like Java 7's try-with-resources.