diff --git a/doc/capi/index.rst.in b/doc/capi/index.rst.in index 887f7ee90c7c6a419a90e6b67f00602fc7816f41..a15f3b876035058113a61f2325cb739f01a39fbb 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: