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 memory checking utility, to ensure that the objects are freed. It counts the number of objects created and destructed, per type.
This utility 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
function.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
function,
when an instance is created._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
destructor function._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
function.main()
After calling this function, the other TeplObjectCounters functions must not be called anymore.
Since: 6.10