Hi Ralph,
I haven't really tested that. But I don't think I should use NetLibClose(libRefNum, true) because there could be other networking applications running.
Another extreme stress testing is that if I create a loop of 1000 times around the NetLibSocketOpen() and NetLibSocketClose(), around 600 - 700 KB of heap will be lost. If I loop around 10000 times, the device will be reset, due to insufficient memory.
Since I simply open and immediately close the socket, the system should NOT lose any heap at all, no matter how many times I perform the operation. This looks like a rather serious system or OS bug to me.
Can anyone reproduce the same on their Treo 650 device?
BTW, if I open a UDP socket (netSocketTypeDatagram), instead of a TCP socket, the codes run just run and without any heap space loss. It only happens with a simple TCP socket with default options.
Tony
> > What do you see happening if you use "err = NetLibClose(libRefNum, > true);" ? Do you still lose heap? > > Ralph >
-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
