Skip to content
This repository was archived by the owner on Oct 18, 2021. It is now read-only.
This repository was archived by the owner on Oct 18, 2021. It is now read-only.

MYDNSConnection -open creates retain loop? #5

@ghmrs356

Description

@ghmrs356

The socket context makes the CFSocket retain and release its owner, why?

CFSocketContext ctxt = { 0, (__bridge void *)(self), CFRetain, CFRelease, NULL };

there should be no reason to do that, since you're invalidating and releasing the socket on dealloc. Creating the socket using the context like:

CFSocketContext ctxt = { 0, (__bridge void *)(self), NULL, NULL, NULL };

seems to work fine. This fixes the deadlock problem I was having, but I'm unsure as to whether the retain/release socket context is on purpose.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions