List Info

Thread: playground/bindings/kimono




playground/bindings/kimono
user name
2007-03-22 15:58:50
SVN commit 645537 by rdale:

* The above problem is caused by the GCHandle leak
preventing premature
  garbage collection, and once the leak problem was fixed it
exposed
  Qyoto's problems with coordinatign C#'s GC with Qt memory
management
  via QObject trees etc.
* Qyoto method calls can now return null values

CCMAIL: kde-bindingskde.org



 M  +5 -0      ChangeLog  
 M  +14 -6     SmokeInvocation.cs  


--- trunk/playground/bindings/kimono/ChangeLog
#645536:645537
 -4,6
+4,11 
 	* Freed GCHandles in a few places, but there are still a
lot of leaks
 	* Hmm, a fix for a GCHandle leak stopped custom slots from
working for
 	  no apparent reason.
+	* The above problem is caused by the GCHandle leak
preventing premature
+	  garbage collection, and once the leak problem was fixed
it exposed
+	  Qyoto's problems with coordinatign C#'s GC with Qt
memory management
+	  via QObject trees etc.
+	* Qyoto method calls can now return null values
 
 2007-03-21  Arno Rehn  <arnoarnorehn.de>
 
--- trunk/playground/bindings/kimono/SmokeInvocation.cs
#645536:645537
 -531,19
+531,27 
 					} else if (returnType == typeof(double)) {
 						returnValue.ReturnValue = stack[0].s_double;
 					} else if (returnType == typeof(string)) {
-						returnValue.ReturnValue = ((GCHandle)
stack[0].s_class).Target;
+						if (((IntPtr) stack[0].s_class) == (IntPtr) 0) {
+							returnValue.ReturnValue = null;
+						} else {
+							returnValue.ReturnValue = ((GCHandle)
stack[0].s_class).Target;
 #if DEBUG
-						DebugGCHandle.Free((GCHandle) stack[0].s_class);
+							DebugGCHandle.Free((GCHandle) stack[0].s_class);
 #else
-						((GCHandle) stack[0].s_class).Free();
+							((GCHandle) stack[0].s_class).Free();
 #endif
+						}
 					} else {
-						returnValue.ReturnValue = ((GCHandle)
stack[0].s_class).Target;
+						if (((IntPtr) stack[0].s_class) == (IntPtr) 0) {
+							returnValue.ReturnValue = null;
+						} else {
+							returnValue.ReturnValue = ((GCHandle)
stack[0].s_class).Target;
 #if DEBUG
-						DebugGCHandle.Free((GCHandle) stack[0].s_class);
+							DebugGCHandle.Free((GCHandle) stack[0].s_class);
 #else
-						((GCHandle) stack[0].s_class).Free();
+							((GCHandle) stack[0].s_class).Free();
 #endif
+						}
 					}
 				}
 			}
_______________________________________________
Kde-bindings mailing list
Kde-bindingskde.org
ht
tps://mail.kde.org/mailman/listinfo/kde-bindings

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )