[evolution-patches] patch for e-book-view-listener
- From: Chris Toshok <toshok ximian com>
- To: Evolution Patches <evolution-patches ximian com>
- Subject: [evolution-patches] patch for e-book-view-listener
- Date: Fri, 19 Mar 2004 18:16:48 -0800
we're a little ref/unref happy, it appears.
Chris
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/addressbook/ChangeLog,v
retrieving revision 1.107
diff -u -r1.107 ChangeLog
--- ChangeLog 18 Mar 2004 21:48:04 -0000 1.107
+++ ChangeLog 20 Mar 2004 02:15:37 -0000
@@ -1,3 +1,11 @@
+2004-03-19 Chris Toshok <toshok ximian com>
+
+ * libebook/e-book-view-listener.c (main_thread_get_response):
+ don't unref the listener in the loop.
+ (e_book_view_listener_queue_response): don't ref the listener for
+ every request.
+ (e_book_view_listener_dispose): add some debug spew.
+
2004-03-18 Chris Toshok <toshok ximian com>
* tests/ebook/Makefile.am (noinst_PROGRAMS): add test-stress-bookviews.
Index: libebook/e-book-view-listener.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/addressbook/libebook/e-book-view-listener.c,v
retrieving revision 1.5
diff -u -r1.5 e-book-view-listener.c
--- libebook/e-book-view-listener.c 24 Feb 2004 23:44:39 -0000 1.5
+++ libebook/e-book-view-listener.c 20 Mar 2004 02:15:38 -0000
@@ -10,6 +10,7 @@
*/
#include <config.h>
+#include <pthread.h>
#include <bonobo/bonobo-main.h>
#include "e-book-view-listener.h"
#include "e-book-view.h"
@@ -70,8 +71,6 @@
g_signal_emit (listener, e_book_view_listener_signals [RESPONSE], 0, response);
free_response (response);
-
- bonobo_object_unref (listener);
}
listener->priv->idle_id = -1;
@@ -95,8 +94,6 @@
return;
}
- bonobo_object_ref (listener);
-
g_mutex_lock (listener->priv->idle_mutex);
g_async_queue_push (listener->priv->queue, response);
@@ -319,6 +316,8 @@
{
EBookViewListener *listener = E_BOOK_VIEW_LISTENER (object);
+ d(printf ("%p: in e_book_view_listener_dispose (%p)\n", pthread_self(), object));
+
if (listener->priv) {
if (listener->priv->idle_id != -1)
g_source_remove (listener->priv->idle_id);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]