Re: Gio & memory management

2008-10-14 Thread nico
Thank you Nicola, Yes, that's it. Now everything seems to be alright (I'm stupid). Regards, Nicolas Because you are unrefing it in the wrong place. Now you have: while ((file_info = g_file_enumerator_next_file()) != NULL) { ... } g_object_unref(file_info); Here file_info is surely NULL an

Re: Gio & memory management

2008-10-14 Thread nico
Thank you Nicola, And you're also g_freeing a GFileInfo, which is a GObject. Try to use g_object_unref() instead. Ciao When I use g_object_unref() instead of g_free(file_info); I've got this error : (process:30949): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (obj

Re: Gio & memory management

2008-10-14 Thread nico
myself (with malloc, strcpy, strcat, free). Regards, Nicolas Damien Caliste wrote: Hello, Le 14/10/2008, nico <[EMAIL PROTECTED]> a écrit : And here is the source code of the program: http://yojik.shtooka.net/gio.c I didn't run nor check extensively the program but mayb

Re: Gio & memory management

2008-10-14 Thread nico
Hi, The problem may be a simple one: the "." and ".." directories. Unless g_file_enumerate_children filters these out for you (the online documentation makes no mention of doing so) you need to ignore these. Otherwise, you'll just keep scanning the same directory, or its parent, over and over a

Re: Gio & memory management

2008-10-13 Thread nico
Hello, I would like to know your opinion about the problem with the memory usage, that I was talking about in my previous mails... Did someone test the script? Did someone look charts that I make? Does it use the same quantity of memory to scan directories? If everything is alright with the cod

Re: Gio & memory management (suite)

2008-10-11 Thread nico
Here is the patched script I was talking about in my previous message : http://yojik.shtooka.net/gio.c ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Re: Gio & memory management

2008-10-11 Thread nico
ers these out for you (the online > documentation makes no mention of doing so) you need to ignore these. > Otherwise, you'll just keep scanning the same directory, or its parent, > over and over again. > > Have a look at the program output. Do you see "ENTER IN xxx"

Re: Gio & memory management

2008-10-11 Thread nico
Hi Enrico, Thank you for your answer... I'll try to read more about GError (in fact, i wrote first a program with GLibmm, and then rewrote the program in GLib to test whether the memory usage would be the same in pure C, but that's my first program with GLib without the C++ binding). Unfortu

Gio & memory management

2008-10-11 Thread nico
Hello, I wrote a program that list recursively files from a given directory. I'm impressed by the memory usage of such a program (after one minutes, it uses more than 100 BM on my /usr/ directory... after 5 minute I have to kill the process : I've only 512 MB of RAM... so my system is becoming

OT: Survey facing design patterns and communication

2005-06-08 Thread Nico
Hello everybody! We are a group of students at "Freie Universitaet Berlin". As part of our computer science studies we are going to do a survey facing the use of design patterns in communication. Examples of design patterns are "Abstract Factory", "Singleton", "Composite", "Iterator" and "Liste