docs/Writerside/topics/collection.h.md

changeset 1689
a5b7cf49dea7
parent 1639
5c3e6477aab4
child 1694
a2757c6427cc
--- a/docs/Writerside/topics/collection.h.md	Wed Dec 31 12:51:12 2025 +0100
+++ b/docs/Writerside/topics/collection.h.md	Wed Dec 31 13:39:55 2025 +0100
@@ -106,6 +106,7 @@
 
 // use in your collection's implementation
 cx_invoke_destructor(c, elem)
+cx_invoke_destructor_raw(c, elem)
   
 // the following two can be used to optimize loops
 cx_invoke_simple_destructor(c, elem) 
@@ -120,12 +121,13 @@
 is removed from your collection _without_ being returned to the caller.
 This macro will invoke a simple destructor, if one is assigned, first, and then the advanced destructor (again, if assigned).
 
-> Destructor functions are always invoked with a pointer to the element in your collection.
+> Destructor functions are invoked with a pointer to the element in your collection, unless you use `cx_invoke_destructor_raw()`.
 > If your collection is storing pointers (i.e. `cxCollectionStoresPointers()` returns `true`)
 > the `cx_invoke_destructor()` will make sure that the pointer to the element is dereferenced first,
 > so that the destructor functions are _always_ invoked with a pointer to the actual element.
 > 
 > This is different to how [comparator functions](#comparator-functions) work.
+> If you want the same behavior as for comparators, use `cx_invoke_destructor_raw()`.
 {style="note"}
 
 <seealso>

mercurial