From 08fa3e5518157e5deb49656044308b74f57b2818 Mon Sep 17 00:00:00 2001 From: florian <f.spreckelsen@inidscale.com> Date: Thu, 12 Aug 2021 10:22:00 +0200 Subject: [PATCH] DOC: Add hint on deletion --- doc/capi/index.rst.in | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/doc/capi/index.rst.in b/doc/capi/index.rst.in index 887f7ee..a15f3b8 100644 --- a/doc/capi/index.rst.in +++ b/doc/capi/index.rst.in @@ -24,6 +24,21 @@ C API ===== +.. note:: + + When working with libcaosdb's C API keep the following in + mind. Delete all objects (transactions, entities, properties, + parents, ...) that you created using a `caosdb_..._create_...` + function and only those. + + The underlying reason is that all C++ objects are realized in the + Extern C interface as mutable structs containing a void pointer to + the actuall C++ object which is not filled when initializing the + struct but after calling a create function instead. If the C++ + object wasn't created using a create function, e.g., the parent + object when getting a parent of an entity, it is owned by another + object and deleted together with that object. + .. toctree:: :glob: -- GitLab