aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Hoa V. DINH <dinh.viet.hoa@gmail.com>2015-01-15 15:45:45 -0800
committerGravatar Hoa V. DINH <dinh.viet.hoa@gmail.com>2015-01-15 15:45:45 -0800
commit503c657d31937606b00fc8dd049d78667ab4cee2 (patch)
tree7828270883f71675ff557f4876a92ba70f3b0daa
parent686d0e22b545808486cadb4d1e1a272515ecc7fd (diff)
Revert "Retain dispatch queue"
-rw-r--r--src/core/basetypes/MCObject.cpp4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/core/basetypes/MCObject.cpp b/src/core/basetypes/MCObject.cpp
index 43137f78..28fa3544 100644
--- a/src/core/basetypes/MCObject.cpp
+++ b/src/core/basetypes/MCObject.cpp
@@ -310,17 +310,13 @@ void Object::performMethodOnMainThread(Method method, void * context, bool waitU
void Object::performMethodOnDispatchQueue(Method method, void * context, void * targetDispatchQueue, bool waitUntilDone)
{
if (waitUntilDone) {
- dispatch_retain((dispatch_queue_t) targetDispatchQueue);
dispatch_sync((dispatch_queue_t) targetDispatchQueue, ^{
(this->*method)(context);
- dispatch_release((dispatch_queue_t) targetDispatchQueue);
});
}
else {
- dispatch_retain((dispatch_queue_t) targetDispatchQueue);
dispatch_async((dispatch_queue_t) targetDispatchQueue, ^{
(this->*method)(context);
- dispatch_release((dispatch_queue_t) targetDispatchQueue);
});
}
}