Memory leak till crash due to HttpRequest
Posted
by
Alex R.
on Stack Overflow
See other posts from Stack Overflow
or by Alex R.
Published on 2013-06-30T18:54:18Z
Indexed on
2013/06/30
22:21 UTC
Read the original article
Hit count: 227
dart
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?
© Stack Overflow or respective owner