Back to index

lightning-sunbird  0.9+nobinonly
cairo-debug.c File Reference
#include "cairoint.h"

Go to the source code of this file.


void cairo_debug_reset_static_data (void)

Function Documentation


Resets all static data within cairo to its original state, (ie. identical to the state at the time of program invocation). For example, all caches within cairo will be flushed empty.

This function is intended to be useful when using memory-checking tools such as valgrind. When valgrind's memcheck analyzes a cairo-using program without a call to cairo_debug_reset_static_data, it will report all data reachable via cairo's static objects as "still reachable". Calling cairo_debug_reset_static_data just prior to program termination will make it easier to get squeaky clean reports from valgrind.

WARNING: It is only safe to call this function when there are no active cairo objects remaining, (ie. the appropriate destroy functions have been called as necessary). If there are active cairo objects, this call is likely to cause a crash, (eg. an assertion failure due to a hash table being destroyed when non-empty).

Definition at line 60 of file cairo-debug.c.

Here is the call graph for this function: