chamerling / QuickHubApp

GitHub access from your OS X status bar
MIT License
58 stars 6 forks source link

Fixed issue with background polling thread not getting deleted. #37

Closed gwynantj closed 10 years ago

gwynantj commented 10 years ago

Every time the user loses connection and gets it back it spawned a new thread because calling [[NSRunLoop currentRunLoop] run] would run forever.

  1. Added semaphore so when we want to stop the thread we just call dispatch_semaphore_signal.
  2. Fixed memory leaks when allocating dictionaries and not releasing them.

We really need to think about the polling times....not sure what kind of approach we need to take.

chamerling commented 10 years ago

Thanks for the PR. What kind of approach do you think about?

gwynantj commented 10 years ago

After thinking about it if we use the ASIHttpRequest caching methods provided then this won't be a problem since it doesn't count towards your rate limit when you get a 304.