pidgin: 2f434fce: Add some verbose ref-count debugging for...
qulogic at pidgin.im
qulogic at pidgin.im
Wed Dec 23 03:47:02 EST 2009
-----------------------------------------------------------------
Revision: 2f434fcebe3b39420beed1de231bd1a0c8be383f
Ancestor: c90b505ebd09e2e000ae0d20de84ffd837de2206
Author: qulogic at pidgin.im
Date: 2009-12-23T05:55:02
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/2f434fcebe3b39420beed1de231bd1a0c8be383f
Modified files:
libpurple/ft.c
ChangeLog:
Add some verbose ref-count debugging for PurpleXfer's.
-------------- next part --------------
============================================================
--- libpurple/ft.c 916a98c588f9e4b5aa84645d146567e81f90c84b
+++ libpurple/ft.c c861518e2f9adb11ac374d239a320e15d8a9c4ab
@@ -109,6 +109,10 @@ purple_xfer_new(PurpleAccount *account,
ui_ops->new_xfer(xfer);
xfers = g_list_prepend(xfers, xfer);
+
+ if (purple_debug_is_verbose())
+ purple_debug_info("xfer", "new %p [%d]\n", xfer, xfer->ref);
+
return xfer;
}
@@ -119,6 +123,9 @@ purple_xfer_destroy(PurpleXfer *xfer)
g_return_if_fail(xfer != NULL);
+ if (purple_debug_is_verbose())
+ purple_debug_info("xfer", "destroyed %p [%d]\n", xfer, xfer->ref);
+
/* Close the file browser, if it's open */
purple_request_close_with_handle(xfer);
@@ -148,6 +155,9 @@ purple_xfer_ref(PurpleXfer *xfer)
g_return_if_fail(xfer != NULL);
xfer->ref++;
+
+ if (purple_debug_is_verbose())
+ purple_debug_info("xfer", "ref'd %p [%d]\n", xfer, xfer->ref);
}
void
@@ -158,6 +168,9 @@ purple_xfer_unref(PurpleXfer *xfer)
xfer->ref--;
+ if (purple_debug_is_verbose())
+ purple_debug_info("xfer", "unref'd %p [%d]\n", xfer, xfer->ref);
+
if (xfer->ref == 0)
purple_xfer_destroy(xfer);
}
More information about the Commits
mailing list