http ldownload large file to symbian device
Hi
Using this example i made it run on my N8 and E6 fine. As soon as a download starts of a large 100MB file, I see memory full errors pretty quickly. I have sufficent RAM (>128 MB) and sufficient disk (16GB).
Now i think the problem is the readAll() when writing it.
Code:
file->write(reply->readAll());
The actual write is the problem.
This is not recommended for large files. So i created a simple buffer:
Code:
int t = b.size();
qDebug() << "sz1: " << t;
const int BUFFER_SIZE = 4096;
int s = 0;
int tw = 0;
while (s < t) {
int c = file->write(b.mid(s, BUFFER_SIZE)); // <---
qDebug() << "written: " << c;
tw += c;
s += BUFFER_SIZE;
}
and even this does not work. Like 4K bufferred write should work? Even flushing() after the write makes the memory full come even quicker!
I really need some help here please..
thanks
Re: http ldownload large file to symbian device
When are you calling this code?
Re: http ldownload large file to symbian device
In the httpReadyRead(). It's exactly the same example in my OP ? http://qt-project.org/doc/qt-4.8/net...indow-cpp.html ?
The original Qt example shows memory full on any of my Nokia belle devices. So I though maybe i need to modify and re-buffer the data that's ready. In the API it says don't use readAll() for large files. So what should we be using then for mobile devices? (I used the CODA debug to send the app to my N8 and E6)
thank you