java-gobject-introspection r122 - trunk/src/org/gnome/gir/gobject
- From: walters svn gnome org
- To: svn-commits-list gnome org
- Subject: java-gobject-introspection r122 - trunk/src/org/gnome/gir/gobject
- Date: Sun, 16 Nov 2008 22:52:06 +0000 (UTC)
Author: walters
Date: Sun Nov 16 22:52:06 2008
New Revision: 122
URL: http://svn.gnome.org/viewvc/java-gobject-introspection?rev=122&view=rev
Log:
Better memmgt debug
Modified:
trunk/src/org/gnome/gir/gobject/GObject.java
Modified: trunk/src/org/gnome/gir/gobject/GObject.java
==============================================================================
--- trunk/src/org/gnome/gir/gobject/GObject.java (original)
+++ trunk/src/org/gnome/gir/gobject/GObject.java Sun Nov 16 22:52:06 2008
@@ -69,7 +69,11 @@
private final IntPtr objectID = new IntPtr(System.identityHashCode(this));
- private static final boolean debugMemory = false;
+ private static final boolean debugMemory;
+
+ static {
+ debugMemory = System.getProperty("jgir.debugMemory") != null;
+ }
private static final void debugMemory(String fmt, Object... args) {
if (debugMemory)
@@ -112,7 +116,10 @@
*/
boolean wasFloating = GObjectAPI.gobj.g_object_is_floating(this);
if (wasFloating) {
+ debugMemory("SINK AND TOGGLE %s", this);
GObjectAPI.gobj.g_object_ref_sink(this);
+ } else {
+ debugMemory("TOGGLE %s", this);
}
/* The toggle reference is our primary means of memory management between
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]