-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Memory leak when creating many HttpClient
s
#52541
Comments
@blaugold are you running your app connected under devtools when you observe the memory leak? Wanted to confirm if what you are seeing is a duplicate of flutter/devtools#3290 |
@a-siva I noticed the issue in production where we use an AOT build and replicated it running the repro locally with JIT but never using devtools, so I don't think its a duplicate. |
@blaugold could you give us some information on what tools you are using to observe the memory leak. I tried your test application above by running it for a long time and I did not observe any leaks while monitoring the Dart heap size or the native RSS.
|
Seems like this is the same issue as #53113. When I replace |
Thanks for that clarification, I will dup this issue into that one. |
Marking as a duplicate of #53113 and closing. |
Observed on:
The following program has a memory leak:
Why do I create a new
HttpClient
for each request? I noticed the memory leak when usingIsolate.run
to parallelize work, where eachIsolate
needs its ownHttpClient
. But the multipleIsolate
s don't seem to be the problem, as the code above shows.In the actual app I'm using
package:http
, which has the same issue, but I tried to make the repro as minimal as possible.The text was updated successfully, but these errors were encountered: