[Bug 32053] Add a TpContactSearch proxy object

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Dec 13 22:45:25 CET 2010


--- Comment #18 from Danielle Madeley <danielle.madeley at collabora.co.uk> 2010-12-13 13:45:25 PST ---
(In reply to comment #17)

> Done, I'm now returning a GList<TpContactSearchResult>. Should I register that
> as a new boxed type and make the signal know the type, instead of a
> G_TYPE_POINTER, to not leak the objects in the list?

Since it's a signal, you don't need to register a new type, it doesn't matter.
You are, however, responsible for cleaning up whatever you create after
g_signal_emit() [non-event signals are synchronous].

Thus you want a g_list_foreach(g_object_unref); g_list_free(); pair.

+      results = g_list_append (results, search_result);

Using g_list_prepend() followed by an optional g_list_reverse() will always be
faster. O(2n) vs O(n^2).

Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.

More information about the telepathy-bugs mailing list