Swiftgram/SSignalKitTests/DeallocatingObject.m
2015-02-09 16:34:05 +03:00

28 lines
360 B
Objective-C

#import "DeallocatingObject.h"
@interface DeallocatingObject ()
{
bool *_deallocated;
}
@end
@implementation DeallocatingObject
- (instancetype)initWithDeallocated:(bool *)deallocated
{
self = [super init];
if (self != nil)
{
_deallocated = deallocated;
}
return self;
}
- (void)dealloc
{
*_deallocated = true;
}
@end