You're absolutely right. Forum Nokia won't tell you this (well, you can get some glimpses in for example KIJ001610 and KIJ000852), but you may be in a lot of trouble if you need to transfer large amounts of data.
I've done a lot of testing, and here's the conclusion:
- The data you send using a HttpConnection is retained in memory. The VM will say it's gone, but Symbian won't. Send enough data and you get an OutOfMemoryError. This is regardless of the requests' size.
- SocketConnection might be broken (see the knowledge base article mentioned above), but don't expect it to be fixed on newer models. This differs from device to device. N73, for example, works like a charm. N95 and 5800 do not.
So what do you do? Well, the only workaround is to
- Use SocketConnection (although this only goes for S60, remember)
- Make sure you keep the connection alive. Note that the server you're connecting to must also be configured for keepalive.
- Also note that keeping idle connections alive requires a lot more memory on the server.
Every time you open a new SocketConnection, you go one step closer to doom. "Doom" may occur after 70-100 times; I haven't tested it that thoroughly and it probably varies a lot between devices.
Hope this was of any help!
Ingen kommentarer:
Legg inn en kommentar