Re: [gnome-db] Memory leaks



On 6/4/07, Piotr Pokora <piotrek pokora gmail com> wrote:

BTW, I am not how and if ( at all ) it's related to GDA leaks.

I have a code like this:

read struct->member /* member is GType type */
midgard_core_query_get_model(MidgardConnection *mgd, const gchar *query);
read struct->member

get_model function is very simple:

       GdaCommand *command;
       command = gda_command_new (query,
                        GDA_COMMAND_TYPE_SQL,
                        GDA_COMMAND_OPTION_STOP_ON_ERRORS);

       g_debug("query = %s", query);

        GdaDataModel *model =
                gda_connection_execute_select_command(
                                mgd->priv->connection,
                                command, NULL, NULL);
        gda_command_free(command);

        if(model) return model;

The problem is that after get_model function is invoked struct->member
holds value of quite different GType. It happens only with Apache prefork
environment. It never happens when Apache is running in single mode
without forking. gdb is useless now and valgrind mainly report those gda
leaks.

I wonder if it's gda or mine bug. Or maybe an issue of "weird" environment
( apache is not compiled against gmodule so GType system must be
initialized in child processes ) ?

This should not be a problem.


I think this problem may be linked to a problem Carlos is having,
which corrupts everything. I've made a correction which is now in SVN
trunk (g_free() was called twice on the same string...)

Could you now check (Carlos as well)?

Thanks,

Vivien



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