Commit 5fca5a4e authored by Philip Withnall's avatar Philip Withnall
Browse files

programming-guidelines: Clarify memory management coding style

Fix an ingrammatical sentence in c-coding-style, add a cross-reference
to the memory-management page, and clarify (in a <comment>) on that page
why we don’t mention GSlice anywhere.
parent 46441cd0
......@@ -896,8 +896,7 @@ typedef struct _GtkFooableInterface GtkFooableInterface;</code>
<title>Memory Allocation</title>
When dynamically allocating data on the heap either use
When dynamically allocating data on the heap use <code>g_new()</code>.
......@@ -905,6 +904,10 @@ typedef struct _GtkFooableInterface GtkFooableInterface;</code>
zero-ed, either explicitly for each member, or by using
See <link xref="memory-management"/> for more details.
<section id="macros">
......@@ -19,6 +19,15 @@
<title>Memory Management</title>
Note: GSlice is deliberately not mentioned on this page because we don’t
want to encourage its use. GLib developers are moving towards deprecating
it due to its performance slipping significantly behind the libc
allocator’s on Linux in recent years.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment