[cost] Add model of CFAutorelease

Summary: ObjC objects can be added to autorelease pool by `CFAutorelease`.

Reviewed By: ezgicicek

Differential Revision: D23625632

fbshipit-source-id: 694e5bffb
master
Sungkeun Cho 4 years ago committed by Facebook GitHub Bot
parent 4aa3338947
commit 6ebc5033a8

@ -12,6 +12,7 @@ module Call = struct
let open ProcnameDispatcher.Call in
make_dispatcher
[ +PatternMatch.ObjectiveC.implements "NSObject" &:: "autorelease" &--> ()
; -"CFAutorelease" &--> ()
; +PatternMatch.ObjectiveC.implements "NSKeyedUnarchiver"
&:: "initForReadingFromData:error:" &--> ()
; +PatternMatch.ObjectiveC.implements "NSKeyedUnarchiver"

@ -110,4 +110,8 @@
[self call_autorelease_constant];
}
- (void)call_cf_autorelease_constant:(NSObject*)x {
CFAutorelease((__bridge CFTypeRef)x);
}
@end

@ -28,6 +28,7 @@ codetoanalyze/objc/autoreleasepool/basic.m, Basic.autoreleased_in_loop_nested_ze
codetoanalyze/objc/autoreleasepool/basic.m, Basic.autoreleased_in_loop_sequential_constant:, 1, OnUIThread:false, [autorelease,Call to Basic.call_autorelease_constant,Modeled call to NSObject.autorelease]
codetoanalyze/objc/autoreleasepool/basic.m, Basic.autoreleased_in_loop_sequential_linear:, n, OnUIThread:false, [{n},Loop,autorelease,Call to Basic.call_autorelease_constant,Modeled call to NSObject.autorelease]
codetoanalyze/objc/autoreleasepool/basic.m, Basic.call_autorelease_constant, 1, OnUIThread:false, [autorelease,Modeled call to NSObject.autorelease]
codetoanalyze/objc/autoreleasepool/basic.m, Basic.call_cf_autorelease_constant:, 1, OnUIThread:false, [autorelease,Modeled call to CFAutorelease]
codetoanalyze/objc/autoreleasepool/basic.m, Basic.call_no_autorelease_zero, 0, OnUIThread:false, []
codetoanalyze/objc/autoreleasepool/basic.m, Basic.dealloc, 0, OnUIThread:false, []
codetoanalyze/objc/autoreleasepool/basic.m, Basic.loop_in_autoreleasepool_zero:, 0, OnUIThread:false, []

Loading…
Cancel
Save