mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 19:18:06 +00:00
Launch using the following command: xcodebuild -sdk iphonesimulator -project linphone.xcodeproj -scheme "LinphoneTester" test RUN_UNIT_TEST_WITH_IOS_SIM=YES
30 lines
543 B
Objective-C
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
|