[Mono-list] Dispose method is never called

Giuseppe Greco gius.greco@bluewin.ch
Tue, 22 Jul 2003 19:44:30 +0200


>-- Original Message --
>From: "Joeri Belis" <joeri.belis@nollekens.be>
>To: <mono-list@lists.ximian.com>
>Subject: Re: [Mono-list] Dispose method is never called
>Date: 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.

Yes, but when I run the example, I don't get the last two
messages...

Have you commented out lines 13, 14, and 15?

Gius_.
>
>>
>> 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_.
>>
>
>
>_______________________________________________
>Mono-list maillist  -  Mono-list@lists.ximian.com
>http://lists.ximian.com/mailman/listinfo/mono-list