GnuCash  2.6.99
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
gnc-gobject-utils.h File Reference

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, GObjectClass *klass)
 
void gnc_gobject_tracking_forget (GObject *object)
 
const GList * gnc_gobject_tracking_get_list (const gchar *name)
 
void gnc_gobject_tracking_dump (void)
 

Detailed Description

Gobject helper routines.

Author
Copyright (C) 2005 David Hampton hampt.nosp@m.on@e.nosp@m.mploy.nosp@m.ees..nosp@m.org

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.