Comments (7)
I tried to enable the new leak tracking but didn't get very far yet...
from dio.
Could you attach the minimal reproducible example and some analysis graphs or details?
from dio.
We have noticed an Out of Memory error as well, on iOS since 5.4.x.
Our issue was casting the .get to <List> unnecessarily even though it supports Uint8List.
from dio.
@kuhnroyal I have been thinking about the cause of this issue for the last few days, it could be caused by referencing the resources of the request in callers like .whenComplete
so they will only get released once the CancelToken
canceled, but it doesn't, so memory leaks. Any ideas?
from dio.
If yes, we might add a global map to cache the necessary instances for the corresponding cancel token.
from dio.
@AlexV525 I haven't had time to followup, but yes, as mentioned in my first message, we found that the .whenComplete callback captures over the Request:
if (cancelFuture != null) {
cancelFuture.whenComplete(() => request.abort());
}
and whenComplete() also adds additional handlers each time it is called. So if a CancelToken is passed in to multiple fetches, it will keep accruing whenComplete handlers that all capture over individual requests.
from dio.
@kunstmusik Can you verify if #2252 fixes the issue?
from dio.
Related Issues (20)
- FormData and List of Int not working as expected. HOT 2
- flutter dynamic coockies management HOT 1
- post请求超时无反应 HOT 1
- Error Dio flutter web HOT 1
- upload file send timeout
- Header is out of order HOT 3
- `ResponseType.stream` is not working on web. HOT 1
- [🔔 Dio] sendTimeout cannot be used without a request body to send HOT 2
- `Transformer.isJsonMimeType` throws format exceptions without caught
- onError is not returning any error HOT 3
- Error when uploading image using MultipartFile.fromBytes in version 5.4.3+1 HOT 1
- 为什么dio的fromMap会将MultipartFile自动放入files字段中 HOT 1
- Error: The method 'debugLog' isn't defined for the class 'BrowserHttpClientAdapter'. HOT 1
- Version 5.5.0 brakes the web build HOT 1
- Is it now possible to use DIO / dio_web_adapter with Web/WASM? HOT 18
- Dio 5.5 broke compilation for WASM HOT 6
- ResponseType.stream returns responce all at once on Web HOT 1
- Date header not parsed correctly
- set proxy for BrowserHttpClientAdapter HOT 1
- Dio fetch can't catch error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dio.