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

fix: add autorelease pool to drain temporary objects #983

Merged
merged 4 commits into from
Feb 26, 2025

Conversation

abhinvv1
Copy link

@abhinvv1 abhinvv1 commented Feb 25, 2025

What?

  1. Enclosed the loop's within an autorelease pool to drain temporary objects (like XCElementSnapshot instances) created during each iteration. This prevents these objects from accumulating in memory until the main autorelease pool drains, thus mitigating potential leaks.
  2. Reduce memory usage of any temporary objects (e.g., the snapshot, wrapper, or internal objects from fb_takeSnapshot) if the method is called frequently (e.g., in loops or recursive traversals).

Copy link

linux-foundation-easycla bot commented Feb 25, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

@mykola-mokhnach
Copy link

Thanks you @abhinvv1

Please sign the CLA and rename the PR according to conventional commit rules

@abhinvv1
Copy link
Author

Thanks you @abhinvv1

Please sign the CLA and rename the PR according to conventional commit rules

yes, sure I'll be doing that

@abhinvv1 abhinvv1 changed the title Add autorelease pool to drain temporary objects fix: add autorelease pool to drain temporary objects Feb 26, 2025
@KazuCocoa
Copy link
Member

lg to the best of my knowledge... Waiting on CI

@mykola-mokhnach mykola-mokhnach merged commit f92f1cd into appium:master Feb 26, 2025
42 of 43 checks passed
github-actions bot pushed a commit that referenced this pull request Feb 26, 2025
## [9.0.5](v9.0.4...v9.0.5) (2025-02-26)

### Bug Fixes

* add autorelease pool to drain temporary objects ([#983](#983)) ([f92f1cd](f92f1cd))
Copy link

🎉 This PR is included in version 9.0.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

3 participants