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

iOS: fix retain cycles in EnvoyNetworkMonitor #2415

Merged
merged 1 commit into from
Jul 13, 2022

Conversation

jpsim
Copy link
Contributor

@jpsim jpsim commented Jul 12, 2022

And properly clean up reachability ref.

Risk Level: Low
Testing: Validated using the memory graph debugger in Xcode with both reachability and path monitor modes
Docs Changes: N/A
Release Notes: N/A

Signed-off-by: JP Simard jp@jpsim.com

And properly clean up reachability ref.

Signed-off-by: JP Simard <jp@jpsim.com>
@jpsim jpsim requested review from Augustyniak and goaway July 12, 2022 19:21
@Augustyniak Augustyniak self-assigned this Jul 12, 2022
@@ -38,6 +43,7 @@ - (void)startPathMonitor {
nw_path_monitor_set_queue(_path_monitor, queue);

__block envoy_network_t previousNetworkType = -1;
envoy_engine_t engineHandle = _engineHandle;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was causing a retain cycle in the nw update block.

@jpsim jpsim merged commit f3ef916 into main Jul 13, 2022
@jpsim jpsim deleted the jp-fix-network-monitor-cycles branch July 13, 2022 15:53
jpsim added a commit that referenced this pull request Jul 18, 2022
* main:
  tools: fix source mapping (#2429)
  Update Envoy (#2427)
  tools: add arm64 debug run configuration (#2424)
  Revert "docs: use sphinx githubpages extension (#2418)" (#2425)
  Remove Tulsi configuration & docs (#2421)
  Fix isCleartextTrafficPermitted (#2420)
  Squelch two JNI build warnings (#2426)
  dns: allow using the `getaddrinfo`-based system DNS resolver (#2419)
  docs: use sphinx githubpages extension (#2418)
  Update Envoy (#2417)
  Remove rules_cc uses
  Bump Lyft Support Rotation (#2414)
  iOS: fix retain cycles in `EnvoyNetworkMonitor` (#2415)
  Update Envoy (#2413)
  engine: remove outdated comment about `registerFactories()` (#2412)
  api: make RequestTrailersBuilder and ResponseHeadersBuilder constructors public (#2410)

Signed-off-by: JP Simard <jp@jpsim.com>
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.

2 participants