Re: [gnome-db] Thats may be a memory leak ??



On Wed, 2001-12-26 at 04:37, Jorge Cardoso wrote:
> 
> Hi guys
> 
> I have modified gda-test.c as follow
> 
> ....
> 
>  while  (  1 ! = 0 )
>    { 
>     CreateConexion(cnc);
>     OpenConexion(cnc);
>     CloseConexion(cnc);
>     DestroyConexion(cnc);
>     }
> .......
> 
> --------------------------
> where 
> 
> void CreateConexion(GdaConnection * &cnc)
> {
>    cnc = gda_connection_new(gda_corba_get_orb());
>    gda_connection_set_provider(cnc, PROVIDER);
> }
> 
> void OpenConexion(GdaConnection * &cnc)
> {
>    gda_connection_open(cnc,DSN,USER, PASSWD);
> }
> 
> void CloseConexion(GdaConnection * &cnc)
> {
>     gda_connection_close(cnc);
> }
> 
> void DestroyConexion(GdaConnection * &cnc)
> {
>     gda_connection_free(cnc);
> }
> 
> 
> -----------------------------------------
> 
> So, while  running the program I see a memory leak using gtop.
> 
> But running as follow, I don't see any problem
> ....
> 
>  while  (  1 ! = 0 )
>    { 
>     CreateConexion(cnc);
>  // OpenConexion(cnc);
>  // CloseConexion(cnc);
>     DestroyConexion(cnc);
>     }
> 
> Question
> 
> What I'm doing wrong on the first case. ??
> 
> I have an Oracle 8i database and the connection work properly with 
> libgda 0.29.3
> 
hmm, where is it leaking? It might be somewhere in the libgda code,
internally. Could you use memprof, for instance, which will tell you
where the memory leak is?

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



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