[Mono-list] Finalizer never called

Giuseppe Greco giuseppe.greco@agamura.com
Fri, 01 Aug 2003 11:31:53 +0200


On Fri, 2003-08-01 at 11:18, Gonzalo Paniagua Javier wrote:
> El vie, 01-08-2003 a las 07:01, Giuseppe Greco escribió:
> > Hi all,
> > 
> > I've still the problem that the destructor (or finalizer) is
> > never called... and this cause my applications to crash when
> > exiting.
> 
> Finalizers are not guaranteed to be called and if they are called, it
> may not be inmediately.

That would be OK... If one need the finalizer to be called immediately,
he has just to call the Dispose() method (actually, that's my
workaround).

A question: could really happen that a finalizer is never called?
If so, how would managed resources be released?

> 
> > 
> > I'm using the very last version of Mono/mcs and I'm running
> > a RedHat 9 box...
> > 
> > Since I implement the IDisposable interface, the only way to
> > get my apps exit gracefully, is to call Dispose() explicitly...
> > 
> > Please, try the attached program more than once (yes, because
> > it may complete successfully the first time you execute it),
> > and let me know if you have the same problem...
> 
> Can you file a bug report attaching the source code?

Okay, if you think this is a bug, I'll fill a bug report
immediately.

Thanks,
Gius_.

> 
> Thanks.
> 
> -Gonzalo
> 
> 
> _______________________________________________
> Mono-list maillist  -  Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
-- 
----------------------------------------
Giuseppe Greco

::agamura::

phone:  +41 (0)91 604 67 65
mobile: +41 (0)76 390 60 32
email:  giuseppe.greco@agamura.com
web:    www.agamura.com
----------------------------------------