brintos

brintos / llvm-project-archived public Read only

0
0
Text · 827 B · ac51911 Raw
50 lines · plain
1 2 3@interface MyObject : NSObject {4  id _myproperty;5}6@end7 8@implementation MyObject // warn: lacks 'dealloc'9@end10 11@interface MyObject : NSObject {}12@property(assign) id myproperty;13@end14 15@implementation MyObject // warn: does not send 'dealloc' to super16- (void)dealloc {17  self.myproperty = 0;18}19@end20 21@interface MyObject : NSObject {22  id _myproperty;23}24@property(retain) id myproperty;25@end26 27@implementation MyObject28@synthesize myproperty = _myproperty;29  // warn: var was retained but wasn't released30- (void)dealloc {31  [super dealloc];32}33@end34 35@interface MyObject : NSObject {36  id _myproperty;37}38@property(assign) id myproperty;39@end40 41@implementation MyObject42@synthesize myproperty = _myproperty;43  // warn: var wasn't retained but was released44- (void)dealloc {45  [_myproperty release];46  [super dealloc];47}48@end49 50