[Mono-bugs] [Bug 77530][Nor] Changed - [PATCH] serialization of integral enum value is not correct

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Tue Feb 21 12:18:02 EST 2006


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 gert.driesen at pandora.be.

http://bugzilla.ximian.com/show_bug.cgi?id=77530

--- shadow/77530	2006-02-21 07:36:46.000000000 -0500
+++ shadow/77530.tmp.11145	2006-02-21 12:18:02.000000000 -0500
@@ -191,6 +191,19 @@
 ------- Additional Comments From lluis at ximian.com  2006-02-21 07:36 -------
 Hi. I don't see the fix for 3).
 
 + Write ("return FromEnum ((long) val, new string[] {...
 
 This will create a new string[] each time it is called.
+
+------- Additional Comments From gert.driesen at pandora.be  2006-02-21 12:18 -------
+You're correct, the string[] itself is created each time, but it is 
+created from an array that is cached.
+
+Do you really think we should cache the string (meaning new string[] 
+{ "EnumConstantName1", "EnumConstantName2", ... }) ? Isn't it enough 
+to cache the string[] that is used to construct the code, instead of 
+the code itself ?
+
+What's your opinion on the usefulness of the three arrays (for enum 
+names, xml names, values) I added on EnumMap ? Do you think its ok to 
+initialize these in the ctor, instead of using lazy init ?


More information about the mono-bugs mailing list