Please do not reply to this email- if you want to comment on the bug, go to the URL shown below and enter your comments there.
Changed by [EMAIL PROTECTED] http://bugzilla.ximian.com/show_bug.cgi?id=81627 --- shadow/81627 2007-07-18 13:23:00.000000000 -0400 +++ shadow/81627.tmp.28800 2007-07-19 09:48:55.000000000 -0400 @@ -200,6 +200,32 @@ which notification mecanism was used? Did you have the MONO_MANAGED_WATCHER enviroment variable set? Juraj, your patch looks fine, could you sent it to the mono-devel list so it can have more reviews as it touches some very sensible code. + +------- Additional Comments From [EMAIL PROTECTED] 2007-07-19 09:48 ------- +I'm writing down a few thoughts about the MulticastDelegate (MCD) +implementation, see they don't get lost. Feel free to ignore or +comment on them. + +Right now, MCDs are chained up in a linked list. The methods +GetInvocationList() and KPM() (used by RemoveImpl) temporarily build a +double linked list. This might lead to leaks (I haven't checked the +code that thoroughly). + +According to "CLR via C#" (Jeffrey Richter), p. 340-344, MS.net use a +different approach for the chaining. MCD have a field +"_invocationList", which contains null or a reference to a array of +delegates. If this field is null, the containing MCD is a "regular +MCD" otherwise the containing MCS's only purpose is holding the list +of chained MCDs. + +I'm attaching a modified version of MulticastDelegate.cs which follows +that approach. You cannot use it unless you adjust the corresponding +data structures and code in the runtime (search for +"MonoMulticastDelegate"): +- /metadata/object-internals.h +- /metadata/verify.c +- /metadata/marshal.c +- /mini/mini-trampolines.c _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
