Hi, On 07 Jan 2010, Aleksander Morgado wrote: >Just wanted to confirm the proper way of using GSources along >with Sofia-SIP. [...] >a) in step 2, when calling su_glib_root_gsource(), am I >getting a NEW reference to the GSource? This is, do I need a >g_source_unref() for each su_glib_root_gsource()?
it's a new reference, so you need to unref it. >b) Is su_root_destroy() calling g_source_unref() for the GSource? It's calling it for additional references (these are indirect references from other parts of sofia-sip using the mainloop), but the initial reference is owned by the caller of su_glib_root_gsource(). For some existing usage examples, see sofsip_cli/src/sofsip_cli.c [1] and telepathy-sofiasip/src/sip-connection-manager.c [2]. [1] http://sofia-sip.org/repos/sofsip-cli/src/sofsip_cli.c [2] http://git.collabora.co.uk/?p=telepathy-sofiasip.git;a=blob;f=src/sip-connection-manager.c;h=73c57b6e413905d882d528c89a4c95dd25f3eb41;hb=HEAD br, -- first.surn...@nokia.com (Kai Vehmanen) ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ Sofia-sip-devel mailing list Sofia-sip-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel