After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 732081 - gsocket: Document that g_socket_create_source() holds a socket ref
gsocket: Document that g_socket_create_source() holds a socket ref
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: network
unspecified
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2014-06-23 09:13 UTC by Philip Withnall
Modified: 2014-06-23 15:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gsocket: Document that g_socket_create_source() holds a socket ref (1.29 KB, patch)
2014-06-23 09:13 UTC, Philip Withnall
committed Details | Review

Description Philip Withnall 2014-06-23 09:13:19 UTC
Trivial patch attached.
Comment 1 Philip Withnall 2014-06-23 09:13:21 UTC
Created attachment 278976 [details] [review]
gsocket: Document that g_socket_create_source() holds a socket ref

This is quite important, as it means you can safely let the GSocket drop
out of scope while maintaining a reference to the GSource, and the
socket will remain open. That means fewer closure structures, simpler
code, and fewer allocations.
Comment 2 Philip Withnall 2014-06-23 15:25:18 UTC
Pushed, thanks.

Attachment 278976 [details] pushed as 00e7333 - gsocket: Document that g_socket_create_source() holds a socket ref