Skip to content

Several memory leaks.. #8

Description

@hacx

First problem:
You have those 2 lines:

[_inputStream removeFromRunLoop:[NSRunLoop currentRunLoop] forMode:NSRunLoopCommonModes];
	[_inputStream removeFromRunLoop:[NSRunLoop currentRunLoop] forMode:NSRunLoopCommonModes];

The second line should be replaced with _outputStream.

Second problem:
You are retaining the _inputStream and _outputStream, which is wrong. the returned streams from CFSocketCreate & CFStreamCreatePairWithSocketToHost are following the "Create Rule". which means they are already returned as retained. you should only release them when you're done.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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