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: leaks #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

iOS: leaks #24

wants to merge 1 commit into from

Conversation

manmaor
Copy link

@manmaor manmaor commented Feb 20, 2023

Hi, we experienced some leaks in our iOS app, after some investigation we found two memory leaks:

  • rawBytes in UIImageExtension (calloc not freed)
  • normalizedBuffer in UIImageExtension (malloc not freed)

from the Profiler:
Profiler image

In the first case, I was able to free the memory at the end of the method.
But in the second case, we return normalizedBuffer to use as the input, so I freed the input in PyTorchMobilePlugin.

Hoping for your fast response.
Maor.

- free rawBytes in UIImageExtension
- free input in PyTorchMobilePlugin
@igala
Copy link

igala commented Mar 13, 2023

@fynnmaarten Hello Fyn,

Can you please review this?

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