Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory leaks #657

Open
losedMemory opened this issue Mar 17, 2023 · 2 comments
Open

Memory leaks #657

losedMemory opened this issue Mar 17, 2023 · 2 comments

Comments

@losedMemory
Copy link

losedMemory commented Mar 17, 2023

I have multiple domain names that need to be switched, and when I call openButtonClick multiple times, there is a memory leak

- (void)openButtonClick {
    if (self.webSocket) {
        [self.webSocket close];
        self.webSocket.delegate = nil;
        self.webSocket = nil;
    }
    
    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"wss://www.doex.com/ws/quote/v1"]];
    [request setTimeoutInterval:6];
    [self setHttpHeaderRequest:request];
    self.webSocket = [[SRWebSocket alloc] initWithURLRequest:request];
    self.webSocket.delegate = self;

    [self.webSocket open];
}

image

SocketRocket (0.6.0)

@fahadhaque007
Copy link

Have you had any luck fixing this issue?

@losedMemory
Copy link
Author

您有幸解决这个问题吗?

No, I haven't solved the problem yet.
I'm using 'Starscream'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants