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
Avoid RMQConnection leaks by adopting weak refs, take 3 #197
Conversation
Some trial and error results:
|
I ran this branch as is and we have retain cycle.
What I've done is checked out this branch into my profiling test project. If these changes cause no test failures then I can pull the branch down again and verify against profiler. |
|
The The |
Another strategy would be to review how connections are closed. We may depend on ARC too much and can be more proactive about releasing the resources we obviously won't need any more after a |
For example, the reader doesn't seem to be released here: - (NSArray *)closeOperations {
return @[^{[self closeAllUserChannels];},
^{[self sendFrameset:[[RMQFrameset alloc] initWithChannelNumber:@0 method:self.amqClose]];},
^{[self.channelZero blockingWaitOn:[RMQConnectionCloseOk class]];},
^{[self.heartbeatSender stop];},
^{
self.transport.delegate = nil;
[self.transport close];
}];
} |
Do I have permission to push to this branch? The reason I asked is I wanted to add a New iPhone app Target to the project that links again RMQClient.
If we dont want to give me permission just yet thats fine. |
I will add you as a contributor so that you can push. |
Committer: Michael Klishin <michael@clojurewerkz.org> Author: Barry Duggan <barry.duggan@jci.com>
@BarryDuggan you should be able to push to this repository now. |
Why was this branch deleted without a merge? |
for some important dependencies of allocated channels and
RMQConnection itself.
For example, in this client, RMQConnection auto-allocates a channel for
the purpose of special "channel zero" (system communication
in the protocol) purposes, and that leads to a loop
of strong references that prevent RMQConnection instances
from being released.
Based on object graph analysis by @BarryDuggan in #194.