diff --git a/Bolts/Common/BFExecutor.m b/Bolts/Common/BFExecutor.m index 0632183b52fe55866c1959007a3ccb99743173ce..820faed68b425cc0768c655c615e8eb7645e12ac 100644 --- a/Bolts/Common/BFExecutor.m +++ b/Bolts/Common/BFExecutor.m @@ -59,7 +59,9 @@ __attribute__((noinline)) static size_t remaining_stack_size(size_t *__nonnull r if (remainingStackSize < (totalStackSize / 10)) { dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), block); } else { - block(); + @autoreleasepool { + block(); + } } }]; }); @@ -85,7 +87,9 @@ __attribute__((noinline)) static size_t remaining_stack_size(size_t *__nonnull r if (![NSThread isMainThread]) { dispatch_async(dispatch_get_main_queue(), block); } else { - block(); + @autoreleasepool { + block(); + } } }]; });