[Mono-list] Dispose method is never called

Giuseppe Greco gius.greco@bluewin.ch
Mon, 21 Jul 2003 06:42:52 +0200


--========/3F15D7270000D9C9/mss1n.bluewin.ch
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit


>-- Original Message --
>Subject: Re: [Mono-list] Dispose method is never called
>From: Gonzalo Paniagua Javier <gonzalo@ximian.com>
>To: mono-list@lists.ximian.com
>Date: 11 Jul 2003 22:22:01 +0200
>
>
>El vie, 11-07-2003 a las 12:19, Giuseppe Greco escribió:
>> > > 
>> > > Mono doesn't execute the Finalizer at all. I've posted this problem
>> > > to bugzilla.ximian.com. Look at bug #45962 and get the source code
>> > > I've used to reproduce the problem (source code is attached as a tarball).
>> > > 
>> > > Try to execute that small program either with .NET on Windows or with
>> > > Mono on Linux, and you'll see the differences...
>> > 
>> > Fixed in CVS.
>> 
>> Gonzalo, I've checked out the latest version of Mono
>> from CVS right now, but the problem is still there...
>
>Well, it works for me (tm) :-).
>
>However, it seems that the patch i applied causes some other troubles.
>If I cannot fix them soon, i'll reopen the bug and add more info on
>this.

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_.

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


--========/3F15D7270000D9C9/mss1n.bluewin.ch
Content-Type: application/x-gzip
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="finalizer.tar.gz"

H4sIAHmJGz8AA+0YS2wb13F2JVEW/aks2ZYUG/UTFbuk0vCjb2V9rFCyHBdWHICOXRgFkiX5JG2y
3GX3Y1kOlKaHFskll16CAAHaQ3vNpUCTFkh7KNCTe0wRIAVySIocmh6KAgWKNurM21lyKcuuUMhJ
Dxxy3mfeezPzZubN7r410zYs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