[Mono-list] Dispose method is never called

Joeri Belis joeri.belis@nollekens.be
Tue, 22 Jul 2003 11:54:08 +0200


It compiled and ran the "MyFinalizer()" example with and without lines (
13 -> 15 )
but is get the same output results. Is this what to expect?

C:\DOCUME~1\joeri\MIJNDO~1\SHARPD~1\HELLOW~1>fin.exe
Constructor
Bye!
Destructor
Free unmanaged resources.

>
> Gonzalo, in mono-threaded applications the destructor
> (or Finalize method) is called, but in multi-threaded
> ones it isn't. Please try the attached program. As you
> will see, the thread method is brutally interrupted and
> the finalizer is never called.
>
> If you comment out line 13, 14, and 15 in finalizer.cs,
> then it works fine.
>
> I hope that helps...
>
> Gius_.
>