Skip to content

Several memory leaks.. #8

@hacx

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.

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