You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As you are probably aware, once the watcher thread has been started, there is no way to dealloc the VDKQueue object. This is because detachThread retains the target (which is "self"), so the retainCount is 2. Unless you provide a way to stop the thread, the object can never be released! Even worse, if the object was created by its delegate, and the delegate goes away, it will try to send messages to the delegate, causing a crash.
The fix I'm using is to add a new method (stopWatching:) which sets _keepWatcherThreadRunning to NO and removes all the watched path entries, then require the client to call it before calling release.
The text was updated successfully, but these errors were encountered:
As you are probably aware, once the watcher thread has been started, there is no way to dealloc the VDKQueue object. This is because detachThread retains the target (which is "self"), so the retainCount is 2. Unless you provide a way to stop the thread, the object can never be released! Even worse, if the object was created by its delegate, and the delegate goes away, it will try to send messages to the delegate, causing a crash.
The fix I'm using is to add a new method (stopWatching:) which sets _keepWatcherThreadRunning to NO and removes all the watched path entries, then require the client to call it before calling release.
The text was updated successfully, but these errors were encountered: