GnuCash
5.6-150-g038405b370+
|
Gobject helper routines. More...
#include <glib.h>
#include <glib-object.h>
Go to the source code of this file.
Functions | |
Gobject Tracking Functions | |
This set of functions is used to maintain a "database" of objects that are built on top of a GObject (any level of nesting). This database is simply a hash table of lists. The hash table takes the object name as its key and returns a list of all objects of that type. The object is then added to, deleted from, or looked up in the list. The database can also be queried for a list of all objects of a specified type. This can be used to find pre-existing GncTreeModels, etc. (In this case performing a search for a specific object wouldn't help because the information being inspected is private to the object.) Any object added to this database during the execution of gnucash should be deleted from it before completion of the program. WHen the program shuts down, a list of all objects still in the database will be dumped out to the logfile. This should help developers find memory leaks in their code where an object is lost, or is not release because it gained an extra reference at some point during its lifetime. | |
void | gnc_gobject_tracking_remember (GObject *object) |
Tell gnucash to remember this object in the database. More... | |
void | gnc_gobject_tracking_forget (GObject *object) |
Tell gnucash to drop this object from the database. More... | |
const GList * | gnc_gobject_tracking_get_list (const gchar *name) |
Get a list of all known objects of a specified type. More... | |
void | gnc_gobject_tracking_dump (void) |
Dump the entire object tracking database via the g_log() family of functions. More... | |
Gobject helper routines.
The APIs in this file are designed to provide additional functionality to GObjects, or to make it easier to use the Gobject system from within Gnucash.
Definition in file gnc-gobject-utils.h.