Memory leak till crash due to HttpRequest
- by Alex R.
I played with HttpRequest and realized that the memory is not cleaned up after any request.
After some time the running tab within Chrome will crash.
Here is some testing code. Put a large sized file into the 'www' directory and set the URL in the code accordingly.
import 'dart:async';
import 'dart:html';
void main() {
const PATH = "http://127.0.0.1:3030/PATH_TO_FILE";
new Timer.periodic(new Duration(seconds:10), (Timer it)=>getString(PATH));
}
void getString( String url){
HttpRequest.getString(url).then((String data){
});
}
Is this really a bug or did I something wrong?