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

[Bug]: Memory leak when calling native function repeatedly #7883

Open
1 of 3 tasks
vojto opened this issue Feb 11, 2025 · 1 comment
Open
1 of 3 tasks

[Bug]: Memory leak when calling native function repeatedly #7883

vojto opened this issue Feb 11, 2025 · 1 comment
Assignees
Labels
platform: ios type: bug A confirmed bug report

Comments

@vojto
Copy link

vojto commented Feb 11, 2025

Capacitor Version

💊   Capacitor Doctor  💊

Latest Dependencies:

  @capacitor/cli: 7.0.1
  @capacitor/core: 7.0.1
  @capacitor/android: 7.0.1
  @capacitor/ios: 7.0.1

Installed Dependencies:

  @capacitor/android: not installed
  @capacitor/cli: 7.0.1
  @capacitor/core: 7.0.1
  @capacitor/ios: 7.0.1

[success] iOS looking great! 👌

Platforms Affected

  • iOS
  • Android
  • Web

Current Behavior

  1. Create a simple plugin with promise-returning function.
  2. Implement it on iOS side - make it return a 10mb string
  3. Call this function multiple times from JS

If you run this on device, the Safari inspector will report memory being allocated for every call and never garbage collected.

Image

Expected Behavior

Memory should be garbage collected after each call.

Project Reproduction

https://github.com/vojto/dbtest

Additional Information

No response

Copy link

ionitron-bot bot commented Feb 24, 2025

This issue has been labeled as type: bug. This label is added to issues that that have been reproduced and are being tracked in our internal issue tracker.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: ios type: bug A confirmed bug report
Projects
None yet
Development

No branches or pull requests

3 participants