diff --git a/Code/Core/BKMacrosDefinitions.h b/Code/Core/BKMacrosDefinitions.h index 3fe4007..03a436d 100644 --- a/Code/Core/BKMacrosDefinitions.h +++ b/Code/Core/BKMacrosDefinitions.h @@ -21,8 +21,10 @@ #if BK_HAS_ARC #define BK_RETAIN(xx) (xx) + #define BK_RETAIN_WITHOUT_RETURN(xx) #define BK_RELEASE(xx) #define BK_AUTORELEASE(xx) (xx) + #define BK_AUTORELEASE_WITHOUT_RETURN(xx) #define BK_PROP_COPY nonatomic, copy #define BK_PROP_RETAIN strong #define BK_RELEASE_SAFELY(xx) @@ -37,8 +39,10 @@ #endif #else #define BK_RETAIN(xx) [xx retain]; + #define BK_RETAIN_WITHOUT_RETURN(xx) [xx retain]; #define BK_RELEASE(xx) [xx release]; #define BK_AUTORELEASE(xx) [xx autorelease]; + #define BK_AUTORELEASE_WITHOUT_RETURN(xx) [xx autorelease]; #define BK_PROP_COPY nonatomic, copy #define BK_PROP_WEAK assign #define BK_PROP_RETAIN retain diff --git a/Code/Core/BKOperationHelper.h b/Code/Core/BKOperationHelper.h index c604fc7..a8ccdb2 100644 --- a/Code/Core/BKOperationHelper.h +++ b/Code/Core/BKOperationHelper.h @@ -45,19 +45,19 @@ /** - * Execute block on main thread + * Execute block in main thread * - * Execute your long operation on main thread + * Execute your long operation in main thread * *

Example

* * @code - * [BKOperationHelper performBlockOnMainThread:^{ + * [BKOperationHelper performBlockInMainThread:^{ * } waitUntilDone:NO]; * @endcode */ -+ (void)performBlockOnMainThread:(BKBasicBlock)block waitUntilDone:(BOOL)waitUntilDone; ++ (void)performBlockInMainThread:(BKBasicBlock)block waitUntilDone:(BOOL)waitUntilDone; -+ (void)performBlockOnMainThread:(BKBasicBlock)block; ++ (void)performBlockInMainThread:(BKBasicBlock)block; @end diff --git a/Code/Core/BKOperationHelper.m b/Code/Core/BKOperationHelper.m index 003e726..f2b8787 100644 --- a/Code/Core/BKOperationHelper.m +++ b/Code/Core/BKOperationHelper.m @@ -67,14 +67,14 @@ + (void)performBlockInBackground:(BKBasicBlock)block { //////////////////////////////////////////////////////////////////////////////////////////////////// -+ (void)performBlockOnMainThread:(BKBasicBlock)block waitUntilDone:(BOOL)waitUntilDone { ++ (void)performBlockInMainThread:(BKBasicBlock)block waitUntilDone:(BOOL)waitUntilDone { [self performBlockInBackground:nil completion:block waitUntilDone:waitUntilDone]; } //////////////////////////////////////////////////////////////////////////////////////////////////// -+ (void)performBlockOnMainThread:(BKBasicBlock)block { - [self performBlockOnMainThread:block waitUntilDone:NO]; ++ (void)performBlockInMainThread:(BKBasicBlock)block { + [self performBlockInMainThread:block waitUntilDone:NO]; } diff --git a/Code/Core/BaseKitCore.h b/Code/Core/BaseKitCore.h index 1e87b25..2f5a4cb 100644 --- a/Code/Core/BaseKitCore.h +++ b/Code/Core/BaseKitCore.h @@ -24,7 +24,6 @@ #import "BKOperationHelper.h" #import "BKToogleValue.h" #import "BKDeviceAvailability.h" -#import "BKRunBlockAtDealloc.h" #import "BKUtils.h" diff --git a/Code/Core/NSMutableArray+BaseKit.m b/Code/Core/NSMutableArray+BaseKit.m index 016021e..3c6710e 100644 --- a/Code/Core/NSMutableArray+BaseKit.m +++ b/Code/Core/NSMutableArray+BaseKit.m @@ -37,7 +37,7 @@ - (void)addObject:(id)anObject defaultValue:(id)defaultValue { - (void)moveObjectFromIndex:(NSInteger)from toIndex:(NSInteger)to { if (to != from) { id object = [self objectAtIndex:from]; - BK_RETAIN(object); + BK_RETAIN_WITHOUT_RETURN(object); if (to >= self.count) { [self addObject:object];