Fixed the release of an CFDataRef object under garbage collection.
authorDan Preston <danpreston@codechemistry.com>
Tue May 05 15:11:02 2009 -0700 (2009-05-05)
changeset 38f090fd705556
parent 37 7c7d5a0cb4d6
child 39 5ed02247b7fc
Fixed the release of an CFDataRef object under garbage collection.
TCP/TCPListener.m
     1.1 --- a/TCP/TCPListener.m	Tue May 05 15:10:15 2009 -0700
     1.2 +++ b/TCP/TCPListener.m	Tue May 05 15:11:02 2009 -0700
     1.3 @@ -142,7 +142,7 @@
     1.4      
     1.5      if (0 == _port) {
     1.6          // now that the binding was successful, we get the port number 
     1.7 -        NSData *addr = [(NSData *)CFSocketCopyAddress(_ipv4socket) autorelease];
     1.8 +        NSData *addr = [NSMakeCollectable( CFSocketCopyAddress(_ipv4socket) ) autorelease];
     1.9          const struct sockaddr_in *addr4 = addr.bytes;
    1.10          self.port = ntohs(addr4->sin_port);
    1.11      }