IGRAPH_FINALLY_STACK_SIZE

Function IGRAPH_FINALLY_STACK_SIZE 

Source
pub unsafe extern "C" fn IGRAPH_FINALLY_STACK_SIZE() -> c_int
Expand description

\function IGRAPH_FINALLY_STACK_SIZE \brief The number of registered objects.

Returns the number of objects in the stack of temporarily allocated objects. This function is handy if you write an own igraph routine and you want to make sure it handles errors properly. A properly written igraph routine should not leave pointers to temporarily allocated objects in the finally stack, because otherwise an \ref IGRAPH_FINALLY_FREE call in another igraph function would result in freeing these objects as well (and this is really hard to debug, since the error will be not in that function that shows erroneous behaviour). Therefore, it is advised to write your own test cases and examine \ref IGRAPH_FINALLY_STACK_SIZE before and after your test cases - the numbers should be equal.