[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:34:47 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 lluis at ximian.com.
http://bugzilla.ximian.com/show_bug.cgi?id=77530
--- shadow/77530 2006-02-21 12:18:02.000000000 -0500
+++ shadow/77530.tmp.11352 2006-02-21 12:34:47.000000000 -0500
@@ -204,6 +204,15 @@
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 ?
+
+------- Additional Comments From lluis at ximian.com 2006-02-21 12:34 -------
+The code that generates the enum serialization will be called only
+once. The generated code may be called hundreds of times (if being
+used in a web service for example). So what makes sense is to cache
+the array in the generated code, not in the generator.
+
+On the other hand, using lazy init wouldn't help much, since you'll
+always end up creating the arrays, so it is ok.
More information about the mono-bugs
mailing list