# HG changeset patch # User Dan Preston # Date 1241561462 25200 # Node ID f090fd705556b067d6670f64cfde5dc0aae45f5b # Parent 7c7d5a0cb4d6d467d7524ef42dfc82ce7cb445f8 Fixed the release of an CFDataRef object under garbage collection. diff -r 7c7d5a0cb4d6 -r f090fd705556 TCP/TCPListener.m --- a/TCP/TCPListener.m Tue May 05 15:10:15 2009 -0700 +++ b/TCP/TCPListener.m Tue May 05 15:11:02 2009 -0700 @@ -142,7 +142,7 @@ if (0 == _port) { // now that the binding was successful, we get the port number - NSData *addr = [(NSData *)CFSocketCopyAddress(_ipv4socket) autorelease]; + NSData *addr = [NSMakeCollectable( CFSocketCopyAddress(_ipv4socket) ) autorelease]; const struct sockaddr_in *addr4 = addr.bytes; self.port = ntohs(addr4->sin_port); }