Re: [gnet-dev] memory leak??



The leaks seems related to getaddrinfo().  I call freeaddrinfo()  on the
addrinfo if getaddrinfo() succeeds.  I'll try moving the freeaddrinfo()
in case getaddrinfo() fails and addrinfo is set for some reason.  Other
than that, the bug may be in getaddrinfo() itself, in which case there's
nothing I can do.

Try the code in CVS and let me know if that fixes it.

David


On Tue, 6 May 2003, Pierre Emmanuel Gros wrote:

> i think my code lose memory but i don't know why??
> void memory_test()
> {
> GInetAddr*  addr=gnet_inetaddr_new("doro.limsi.fr",6666);
>  gnet_inetaddr_delete(addr);
> }
> int main()
>  {gnet_init ();
> while(1){ memory_test();getc(stdin);}
> }
>
>

-- 
David Helder - dhelder umich edu - <http://www.eecs.umich.edu/~dhelder>




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