Skip to main content
5 events
when toggle format what by license comment
Mar 29, 2017 at 16:31 comment added Mark K Cowan These kind of issues make me miss C++ with its deterministic destruction and RAII...
Mar 28, 2017 at 16:43 comment added user22815 Finalizers are notoriously unreliable: they may run, they may never run, if they run there is no guarantee when they will run. Even the Java architects such as Josh Bloch say finalizers are a terrible idea (reference: Effective Java (2nd Edition)).
Mar 28, 2017 at 13:04 comment added jwenting And even then the finalizer may not in fact run...
Mar 28, 2017 at 12:26 comment added Daenyth This is a bad solution to the problem for the reason Stephen says in his answer - If you rely on finalizers to tidy up, you run into the problem that it can take a very long time for the tidy-up to happen. The finalizer will only be run after the GC decides that the object is no longer reachable. That may not happen until the JVM does a full collection.
Mar 28, 2017 at 5:25 history answered Brett CC BY-SA 3.0