[Bug 32222] New: Potential cyclic references when using request and handle

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Dec 8 11:40:42 CET 2010


https://bugs.freedesktop.org/show_bug.cgi?id=32222

           Summary: Potential cyclic references when using request and
                    handle
           Product: Telepathy
           Version: unspecified
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: tp-glib
        AssignedTo: telepathy-bugs at lists.freedesktop.org
        ReportedBy: guillaume.desmottes at collabora.co.uk
         QAContact: telepathy-bugs at lists.freedesktop.org


When user calls {create_ensure}_and_handle(), we do this in handle_channels():

  if (tp_proxy_get_invalidated (channel) == NULL)
    {
      /* Keep the handler alive while the channel is valid so keep a ref on
       * ourself until the channel is invalidated */
      g_object_ref (self);

      g_signal_connect (channel, "invalidated",
          G_CALLBACK (acr_channel_invalidated_cb), self);
    }

That's because we have to keep the TpSimpleHandler alive while the channel is
being handled to avoid MC closing it thinking the Handler is done.

TpAccountChannelRequest also haves a reference on the TpChannel. So the only
way to get the invalidated signal fired is that the channel is properly closed.
So, if the user releases its ref on the TpChannel but for any reason the
channel is not closed, we leak the TpChannel until it's properly closed.

-- 
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