Re: [gnome-db]memory leak



> > > 
> > > 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;
> > > }
> > > 
> > yes, it's strange, there shouldn't be memory leaks, as you're freeing the memory
> > 
> > correctly. What functions does memprof say the leak is in?
> 
> memprof says that the memory of 'list = gda_list_datasources ()' is not
> freed. I copied gda_list_datasources sources into same file (of course different name:) 
> and tested again. Then memprof sees in gda_list_datasourses a memory leak:
> 'dsns = node = gda_dsn_list()'. And again at the end of the function
> 'dsns' will be freed with 'gda_dsn_free_list(dsns)'. I don't see any memory leaks there.
> Therefore I'm not sure about memprof correctness.  
> 

it seems to me that is may be wrong because of the 'dns = node =
gda_dsn_list' line, since it may be
thinking that both dns and node have been allocated, and maybe he's
expecting a free on both. Don't know, just guessing :)

> BTW: I'm still working on gnome-db integration into glade. But it takes
> me a lot of times to get into gtk and gnome-db stuff. That's actually
> the reason why I'm asking about the memory leak. I've a new
> property added. But I have really a hard time to get it right. 
> 

please, do not hesitate in contacting us if you've got any problem. I'm
sure we'll be able to help you.


> Terry Turner <TerryTurner prodigy net> has made a proposal for the
> GnomeDbControll thing you have talked about. (I quote him since my
> english is not what it should be and specially phrasing what other 
> people have written.)
> 
> "Just a thought, why can't the invisible widget be invisible during the
> normal execution and visiable while in Glade. An invisible widget does not
> effect the containers sizing of the window on screen. In Glade have the
> invisiable widget set with its visiablity parameter set to not visiable.  Put it in
> a containers that only contains invisiable widgets then that row or column
> will not appear on screen under nornmal execution.  This could work
> unless there is some other issues with containers I'm not seeing."
> 
> What to think about that?
> 
I don't know. Damon?


cheers
-- 

Rodrigo Moya <rodrigo gnome-db org> <rodrigo ximian com>
http://www.gnome-db.org/





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