[gnome-db]memory leak
- From: Daniel Wagner <heapsort gmx net>
- To: GDA <gnome-db-list gnome org>
- Subject: [gnome-db]memory leak
- Date: Sat, 17 Mar 2001 15:17:13 +0100
Hi,
I'm bit confused about following code. When I check for memory leaks,
memprof finds some. What's wrong?
BTW the code is from gnome-db/lib/gnome-db-login.
#include <glib.h>
#include <gda-common.h>
#include <liboaf/liboaf.h>
void print_string (gpointer data, gpointer user_data)
{
/* do something */
printf ("%s\n", (char*)data);
}
int main (int argc, char **argv)
{
GList *list = NULL;
oaf_init (argc, argv);
list = gda_list_datasources ();
g_list_foreach (list, (GFunc)print_string, 0);
g_list_foreach (list, (GFunc)g_free, 0);
g_list_free (list);
return 0;
}
wagi
--
Daniel Wagner
email: wagi gmx ch
GnuPG: 1024D/DCDE890A (public key available on any keyserver)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]