linphone-ios/LinphoneTester Tests/DTObjectBlockExecutor.m
Guillaume BIENKOWSKI 5c1bd07b1b Add a unit-test framework for iOS.
Launch using the following command:

   xcodebuild -sdk iphonesimulator -project linphone.xcodeproj -scheme "LinphoneTester" test RUN_UNIT_TEST_WITH_IOS_SIM=YES
2014-09-11 11:39:39 +02:00

30 lines
543 B
Objective-C

//
// DTObjectBlockExecutor.m
// DTFoundation
//
// Created by Oliver Drobnik on 12.02.13.
// Copyright (c) 2013 Cocoanetics. All rights reserved.
//
#import "DTObjectBlockExecutor.h"
@implementation DTObjectBlockExecutor
+ (id)blockExecutorWithDeallocBlock:(void(^)())block
{
DTObjectBlockExecutor *executor = [[DTObjectBlockExecutor alloc] init];
executor.deallocBlock = block; // copy
return executor;
}
- (void)dealloc
{
if (_deallocBlock)
{
_deallocBlock();
_deallocBlock = nil;
}
}
@end