Author: rolf
Date: 2007-09-27 09:05:37 -0400 (Thu, 27 Sep 2007)
New Revision: 86492
Modified:
trunk/olive/class/agclr/System.Windows/ChangeLog
trunk/olive/class/agclr/System.Windows/XamlReader.cs
Log:
* XamlReader.cs: Load: unref the created object once we have a managed
DependencyObject version.
Modified: trunk/olive/class/agclr/System.Windows/ChangeLog
===================================================================
--- trunk/olive/class/agclr/System.Windows/ChangeLog 2007-09-27 13:02:10 UTC
(rev 86491)
+++ trunk/olive/class/agclr/System.Windows/ChangeLog 2007-09-27 13:05:37 UTC
(rev 86492)
@@ -1,3 +1,8 @@
+2007-09-27 Rolf Bjarne Kvinge <[EMAIL PROTECTED]>
+
+ * XamlReader.cs: Load: unref the created object once we have a managed
+ DependencyObject version.
+
2007-09-21 Rolf Bjarne Kvinge <[EMAIL PROTECTED]>
* XamlReader.cs: Use the new ManagedXamlLoader.
Modified: trunk/olive/class/agclr/System.Windows/XamlReader.cs
===================================================================
--- trunk/olive/class/agclr/System.Windows/XamlReader.cs 2007-09-27
13:02:10 UTC (rev 86491)
+++ trunk/olive/class/agclr/System.Windows/XamlReader.cs 2007-09-27
13:05:37 UTC (rev 86492)
@@ -62,7 +62,14 @@
if (top == IntPtr.Zero)
return null;
- return DependencyObject.Lookup (kind, top);
+ DependencyObject result = DependencyObject.Lookup
(kind, top);
+
+ if (result != null) {
+ // Delete our reference, result already has one.
+ NativeMethods.base_unref (top);
+ }
+
+ return result;
}
}
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches