[flang] Use object before converts in fir.dispatch (#68589)
[llvm-project.git] / clang / docs / analyzer / checkers / dealloc_example.m
blobac51911aff16b4ceb9a2b679a34ab8e02e0f2163
3 @interface MyObject : NSObject {
4   id _myproperty;
6 @end
8 @implementation MyObject // warn: lacks 'dealloc'
9 @end
11 @interface MyObject : NSObject {}
12 @property(assign) id myproperty;
13 @end
15 @implementation MyObject // warn: does not send 'dealloc' to super
16 - (void)dealloc {
17   self.myproperty = 0;
19 @end
21 @interface MyObject : NSObject {
22   id _myproperty;
24 @property(retain) id myproperty;
25 @end
27 @implementation MyObject
28 @synthesize myproperty = _myproperty;
29   // warn: var was retained but wasn't released
30 - (void)dealloc {
31   [super dealloc];
33 @end
35 @interface MyObject : NSObject {
36   id _myproperty;
38 @property(assign) id myproperty;
39 @end
41 @implementation MyObject
42 @synthesize myproperty = _myproperty;
43   // warn: var wasn't retained but was released
44 - (void)dealloc {
45   [_myproperty release];
46   [super dealloc];
48 @end