I'm writing code to check if there is a network connection present. In a nutshell, the order of events that I want to occur goes like this:
- User requests information from a web service.
- A timer starts, and checks every second if a connection exists. If it doesn't, put up a view.
- When the information is all received from the web service, the timer in 2 ends.
From what I understand, having the timer run while having the web service load requires a new thread with the timer on it. I understand how to do that and am fine. From what I understand, to end that thread, I call [thread cancel];. How do I take care of memory management from within that thread. There was a timer in there, among other things.
My other thread self terminates, and when it does it releases all it's contents. Is there a way to do that with cancel? Thanks.