WebKit Bugzilla
Attachment 338887 Details for
Bug 184799
: Make WAKScrollView delegate a weak property
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
Source for testing objc-arc and objc-weak
weak-smfr.m (text/x-csrc), 622 bytes, created by
David Kilzer (:ddkilzer)
on 2018-04-26 10:19:11 PDT
(
hide
)
Description:
Source for testing objc-arc and objc-weak
Filename:
MIME Type:
Creator:
David Kilzer (:ddkilzer)
Created:
2018-04-26 10:19:11 PDT
Size:
622 bytes
patch
obsolete
>#include <Foundation/Foundation.h> > >@interface Weak : NSObject >{ >#if !__has_feature(objc_arc_weak) > NSString *_prop; >#endif >} >@property (weak, nonatomic) NSString *prop; >@end > >@implementation Weak >#if !__has_feature(objc_arc_weak) >@synthesize prop = _prop; >#endif >@end > >int main(int argc, char** argv) >{ > Weak *object = [[Weak alloc] init]; > @autoreleasepool { > NSString *string = [NSString stringWithFormat:@"Arguments: %d\n", argc]; > object.prop = string; > NSLog(@"Before release: %p", object.prop); > string = nil; > } > NSLog(@"After release: %p", object.prop); > return 0; >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 184799
:
338374
|
338378
| 338887 |
338889