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

Avoid RMQConnection leaks by adopting weak refs, take 2 #196

Closed
wants to merge 1 commit into from

Conversation

michaelklishin
Copy link
Member

for some important dependencies of allocated channels and
RMQConnection itself.

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.

Contributed by @BarryDuggan in #194.

@michaelklishin michaelklishin marked this pull request as ready for review March 31, 2022 18:19
@michaelklishin michaelklishin force-pushed the rabbitmq-objc-client-194-take-2 branch from e806ca0 to 3ba2990 Compare March 31, 2022 18:29
@michaelklishin
Copy link
Member Author

This has introduced test failures that are basically nil pointers.

@BarryDuggan
Copy link
Collaborator

This has introduced test failures that are basically nil pointers.

Ok, I guess the memory graph in XCode will need be examined more closely.

The upshot of all of this is that we identified a memory issue and an area for improvement in the library which is good.
I'll pick this up again tomorrow.
Hopefully I can get the unit tests running so I can see the issues you do before I make any more suggestions.

…BarryDuggan)

for some important dependencies of allocated channels and
RMQConnection itself.

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.

Contributed by @BarryDuggan in #194.
@michaelklishin michaelklishin force-pushed the rabbitmq-objc-client-194-take-2 branch from 3ba2990 to 95635f3 Compare March 31, 2022 19:07
@michaelklishin
Copy link
Member Author

#197 includes fewer weak references and passes all tests.

@michaelklishin
Copy link
Member Author

We can incrementally add to #197 and re-run @BarryDuggan's allocation tests on one hand, and integration tests on the other.

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

Successfully merging this pull request may close these issues.

None yet

2 participants