Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
これは私を怒らせています!ここで何が問題なのですか?
参照が別のスレッドによって変更されていないという保証はありません。作成時にソケットをローカル変数に割り当て、それを変更し、プロパティを設定して、ローカル変数を解放します。
CFSocketRef socket = CFSocketCreateWithNative(...); if (socket) { ... self.listeningSocket = socket; CFRelease(socket); }