XiaoKL

iOS.ObjC.__attribute__.1-all-_attribute_-directives

__attribute__ Directives

 

1. NS_RETURNS_INNER_POINTER

"__attribute__((objc_returns_inner_pointer)) and NS_RETURNS_INNER_POINTER

Indicates that the method will return a pointer that is only valid for the lifetime of the owner.

This will prevent ARC from preemptively releasing an object when the internal pointer is still in use." Ref[1]

 

 


Reference

1. __attribute__ directives in Objective-C (AAAA+) (Read Again)

https://blog.twitter.com/2014/attribute-directives-in-objective-c

https://blog.twitter.com/engineering/en_us/a/2014/attribute-directives-in-objective-c.html

 

2. __attribute__

http://nshipster.com/__attribute__/

 

3. How exactly does __attribute__((constructor)) work?

http://stackoverflow.com/questions/2053029/how-exactly-does-attribute-constructor-work

 

4. Attributes in Clang

http://clang.llvm.org/docs/AttributeReference.html

 

5. Declaring Attributes of Functions 

https://gcc.gnu.org/onlinedocs/gcc-3.3.2/gcc/Function-Attributes.html

 

6. Implementing a Custom Directive Handler in Clang

http://blog.quarkslab.com/implementing-a-custom-directive-handler-in-clang.html

 

7. 与Clang共舞 — — __attribute__

https://medium.com/@liushuaikobe/与clang共舞-attribute-8b6bc839958c

 

posted on 2018-04-11 19:03  XiaoKL  阅读(143)  评论(0编辑  收藏  举报

导航