Subject: Open and closing connection: out of memory.
I seem to be running into a problem when I need to close and reconnect my xmpp connection more than once. I'm trying to get my app to automatically reconnect after the connection closes (due to network error, or whatever). It works the first time and everything is fine. If I disconnect again, I reconnect again fine but the next time I try to create any sort of window I'm running into memory errors (memory could not be "read", out of memory errors, could not create handle).
I've tried putting the reconnect code on a timer and then on a button to manually reconnect. I've removed any extraneous functions from the onLogin and onClose events thinking maybe it was something I was doing. I've tried setting the connection to null and recreating the connection rather than just calling Open() (because I saw people were having trouble with this a while ago). I've also tried pulling down the latest code through svn and still get the same behavior.
If you could shed any light on this or give me any ideas it would be greatly appreciated. Thanks.
I've tried putting the reconnect code on a timer and then on a button to manually reconnect. I've removed any extraneous functions from the onLogin and onClose events thinking maybe it was something I was doing. I've tried setting the connection to null and recreating the connection rather than just calling Open() (because I saw people were having trouble with this a while ago). I've also tried pulling down the latest code through svn and still get the same behavior.
If you could shed any light on this or give me any ideas it would be greatly appreciated. Thanks.