[Mono-bugs] [Bug 79975][Cri] New - [PATCH] class ResourceManager misused Hashtable.
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Sun Nov 19 03:38:00 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 redforks at gmail.com.
http://bugzilla.ximian.com/show_bug.cgi?id=79975
--- shadow/79975 2006-11-19 03:37:59.000000000 -0500
+++ shadow/79975.tmp.4837 2006-11-19 03:37:59.000000000 -0500
@@ -0,0 +1,51 @@
+Bug#: 79975
+Product: Mono: Class Libraries
+Version: 1.2
+OS: All
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Critical
+Component: CORLIB
+AssignedTo: mono-bugs at ximian.com
+ReportedBy: redforks at gmail.com
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: [PATCH] class ResourceManager misused Hashtable.
+
+class ResourceManager misused Hashtable.
+
+Hashtable ResourceSets use CultureInfo as key, ResouceSet as value.
+
+ set=(ResourceSet)ResourceSets[culture];
+ if(set!=null && !set.isDisposed) {
+ return(set);
+ } else if (set!=null && set.isDisposed) {
+ ResourceSets.Remove (set);
+ set = null;
+ }
+
+
+ResourceSets.Remove (set);
+Hashtable.Remove() using key as argument, but passed value.
+
+
+ public virtual void ReleaseAllResources ()
+ {
+ lock(this)
+ {
+ foreach (ResourceSet r in ResourceSets)
+ r.Close();
+ ResourceSets.Clear();
+ }
+ }
+
+
+foreach (ResourceSet r in ResourceSets)
+Hashtable's Enumerator is DictionaryEnumerator, its item is
+DictionaryEntry, not ResourceSet, I think that should be:
+
+foreach (ResourceSet r in ResourceSets.Values)
More information about the mono-bugs
mailing list