Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Pellegrino Prevete
libhandy
Commits
3c3a11d6
Commit
3c3a11d6
authored
Oct 17, 2018
by
Guido Gunther
Committed by
Guido Gunther
Oct 22, 2018
Browse files
HACKING: document using g_auto* is o.k.
Closes: #33
parent
50f63d56
Changes
1
Hide whitespace changes
Inline
Side-by-side
HACKING.md
View file @
3c3a11d6
...
...
@@ -183,3 +183,21 @@ Use minus signs instead of underscores in property names:
*
Bad":
<property name="margin_left">12</property>
Automatic cleanup
-----------------
It's recommended to use
`g_auto()`
,
`g_autoptr()`
,
`g_autofree()`
for
automatic resource cleanup when possible.
*Good*
:
g_autoptr(GdkPixbuf) sigterm = pixbuf = gtk_icon_info_load_icon (info, NULL);
*Bad*
:
GdkPixbuf *pixbuf = gtk_icon_info_load_icon (info, NULL);
...
g_object_unref (pixbuf);
Using the above is fine since libhandy doesn't target any older glib versions
or non GCC/Clang compilers at the moment.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment