Re: Glade memory leaks?



On Wed, May 06, 2015 at 01:01:08PM +0600, Konstantin P. wrote:
Why this causes memory usage increases in htop?

if (connect_build_object != NULL) {
    g_object_unref (G_OBJECT ( connect_build_object ));
    object = NULL;
}
    connect_build_object = gtk_builder_new();

gtk_builder_add_from_file ( connect_build_object, "main_window.ui", NULL );

    gtk_builder_connect_signals ( connect_build_object, NULL );

connect_window = GTK_WIDGET ( gtk_builder_get_object ( connect_build_object,
"connec" ) );

    gtk_widget_show ( connect_window );

Where connect_build_object is a global variable.

Hi.

You're constructing your user interface from a file. That will create a
number of objects that requires memory. That's not really a leak, it's
the expected behavior.

                Marcus


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]