Destructor nonsense on dlang.org

Alex Rønne Petersen alex at lycus.org
Thu May 24 07:38:10 PDT 2012


On 24-05-2012 16:03, Russel Winder wrote:
> On Thu, 2012-05-24 at 09:38 -0400, Steven Schveighoffer wrote:
> [...]
>> However, I'd tend to believe Java implementations will attempt to invoke
>> all finalizers of objects left on the heap at program shutdown.
>
> As far as I am aware Java implementations do no finalization on exit
> unless System.runFinalizersOnExit(true) has been called. This method is
> deprecated since it can cause incorrect finalization. But like all
> things Java that have been deprecated, they never actually go away.
>
> There is System.runFinalization() which executes finalize on all objects
> in the pending finalization queue.
>

We should really expose a waitForFinalizers() function in core.memory.

-- 
Alex Rønne Petersen
alex at lycus.org
http://lycus.org


More information about the Digitalmars-d mailing list