mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-02 00:17:02 +00:00
28 lines
360 B
Objective-C
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
|