[Mono-devel-list] Releasing connections from pool

Francisco Figueiredo Jr. fxjrlists at yahoo.com.br
Wed Dec 31 09:41:13 EST 2003

Jaroslaw Kowalski wrote:
> I think that this kind of work should be done in finalizers (C#
> destructors). Theory says you shouldn't rely on finalizers to be called at
> any particular moment, but in practice MS calls all finalizers after app
> exits (but does not allow them to take AFAIR 40 seconds to execute). After
> that timeout the process terminates. I'm not sure how mono handles this.
> Some time ago, finalizers weren't called property but I haven't checked
> since then.

Yeap, but finalizers called by vm should only handle unmanaged resources 
as the destruction of other managed objects may already have occured and 
vm can't garantee that your references to managed objects are still valid.

In my case, I'd like to still be able to clean up my managed objects. :(

> There's also AppDomain.DomainUnload event which might be interesting to you.

Uhmm, that's sound interesting...
I will check that.

Thanks Jarek.

Also, sorry for the delay in response.


Francisco Figueiredo Jr.

More information about the Mono-devel-list mailing list