summaryrefslogtreecommitdiff
path: root/glib/glib.h
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2018-06-10 12:20:34 +0100
committerEmmanuele Bassi <ebassi@gnome.org>2018-07-09 10:11:42 +0100
commitc5d2417d07d055e6b91f2573a1a0237b60475393 (patch)
treea9fae5e8f8402d1890d77dd94f6a6bbf822ba746 /glib/glib.h
parent884c4f4eb657d160581a330b8b4864c22d9d2099 (diff)
downloadglib-c5d2417d07d055e6b91f2573a1a0237b60475393.tar.gz
Add refcounted data
It is useful to provide a "reference counted allocation" API that can add reference counting semantics to any memory allocation. This allows turning data structures that usually are placed on the stack into memory that can be placed on the heap without: - adding a public reference count field - implementing copy/free semantics This mechanism is similar to Rust's Rc<Box<T>> combination of traits, and uses a Valgrind-friendly overallocation mechanism to store the reference count into a private data segment, like we do with GObject's private instance data.
Diffstat (limited to 'glib/glib.h')
-rw-r--r--glib/glib.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/glib/glib.h b/glib/glib.h
index 84299c4f9..309366281 100644
--- a/glib/glib.h
+++ b/glib/glib.h
@@ -69,6 +69,7 @@
#include <glib/gquark.h>
#include <glib/gqueue.h>
#include <glib/grand.h>
+#include <glib/grcbox.h>
#include <glib/grefcount.h>
#include <glib/gregex.h>
#include <glib/gscanner.h>