| Top |  |  |  |  | 
| void | tepl_object_counters_init () | 
| void | tepl_object_counters_increment () | 
| void | tepl_object_counters_decrement () | 
| void | tepl_object_counters_final_check () | 
TeplObjectCounters is a utility to detect memory leaks, by counting the number of objects constructed and destructed, per type.
It must be used manually by calling its functions explicitly.
It is not intended to be used in performance-sensitive code areas.
void
tepl_object_counters_init (void);
Must be called before using the other TeplObjectCounters functions, usually
early in the main()
Since: 6.10
void
tepl_object_counters_increment (const gchar *type);
Increments the counter for type
.
For a GObject class, this function must be called in the _init()
Since: 6.10
void
tepl_object_counters_decrement (const gchar *type);
Decrements the counter for type
.
For a GObject class, this function must be called in the _finalize()
Since: 6.10
void
tepl_object_counters_final_check (void);
Prints a warning for each type for which the counter hasn't reached zero.
This function is intended to be called once, towards the end of the main()
After calling this function, the other TeplObjectCounters functions must not be called anymore.
Since: 6.10