Search
15:59:19
Posterdati
I experienced memory leaks in an application using sockets
15:59:24
Posterdati
with multiple connections
15:59:41
Posterdati
and conections-disconnections
16:00:04
Posterdati
when I simply close the socket the memory consumed rised
16:01:03
Posterdati
when I bind nil to the symbol binded to the socket object the memory leak stops
16:20:30
jackdaniel
when there is no reference to socket, it will be GCed with time
16:20:37
jackdaniel
what kind of memory leaks?
16:20:44
jackdaniel
that these are memory leaks?
16:21:22
Posterdati
simply after 20 connections-disconnections cycles I've got memory protection errors
16:22:21
Posterdati
I only bind the symbol to nil after closing the socket and the problem's gone
16:23:29
jackdaniel
maybe some other thread tries to work with the closed socket as if it were opened
16:23:53
Posterdati
one thread - one socket
16:24:32
jackdaniel
I have no idea what is wrong
16:24:47
Posterdati
but now seems to work