Skip to content

Instantly share code, notes, and snippets.

@dinhvh
Created June 17, 2013 16:49
Show Gist options
  • Save dinhvh/5798340 to your computer and use it in GitHub Desktop.
Save dinhvh/5798340 to your computer and use it in GitHub Desktop.
diff --git a/src/core/basetypes/MCOperationQueue.cc b/src/core/basetypes/MCOperationQueue.cc
index 8dd7a4f..72d0041 100644
--- a/src/core/basetypes/MCOperationQueue.cc
+++ b/src/core/basetypes/MCOperationQueue.cc
@@ -154,6 +154,8 @@ void OperationQueue::stoppedOnMainThread(void * context)
mStarted = false;
release(); // (2)
+
+ release(); // (3)
}
void OperationQueue::startThread()
@@ -161,6 +163,7 @@ void OperationQueue::startThread()
if (mStarted)
return;
+ retain(); // (3)
mQuitting = false;
mStarted = true;
pthread_create(&mThreadID, NULL, (void * (*)(void *)) OperationQueue::runOperationsOnThread, this);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment