attribute的用法
来源:互联网 发布:聚享游源码 编辑:程序博客网 时间:2024/06/11 04:42
constructor
destructor
constructor (priority)
destructor (priority)
The constructor attribute causes the function to be called automatically before execution enters main (). Similarly, the destructor attribute causes the function to be called automatically after main () has completed or exit () has been called. Functions with these attributes are useful for initializing data that will be used implicitly during the execution of the program.
You may provide an optional integer priority to control the order in which constructor and destructor functions are run. A constructor with a smaller priority number runs before a constructor with a larger priority number; the opposite relationship holds for destructors. So, if you have a constructor that allocates a resource and a destructor that deallocates the same resource, both functions typically have the same priority. The priorities for constructor and destructor functions are the same as those specified for namespace-scope C++ objects (see C++ Attributes).
These attributes are not currently implemented for Objective-C.
http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html
http://blog.chinaunix.net/u2/62358/showart_500457.html
destructor
constructor (priority)
destructor (priority)
The constructor attribute causes the function to be called automatically before execution enters main (). Similarly, the destructor attribute causes the function to be called automatically after main () has completed or exit () has been called. Functions with these attributes are useful for initializing data that will be used implicitly during the execution of the program.
You may provide an optional integer priority to control the order in which constructor and destructor functions are run. A constructor with a smaller priority number runs before a constructor with a larger priority number; the opposite relationship holds for destructors. So, if you have a constructor that allocates a resource and a destructor that deallocates the same resource, both functions typically have the same priority. The priorities for constructor and destructor functions are the same as those specified for namespace-scope C++ objects (see C++ Attributes).
These attributes are not currently implemented for Objective-C.
http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html
http://blog.chinaunix.net/u2/62358/showart_500457.html
阅读全文
0 0
- attribute的用法总结
- attribute的用法总结
- <jsp:attribute>的用法
- attribute的用法
- attribute用法
- 用javascript模拟C#的[Attribute]用法
- 用javascript模拟C#的[Attribute]用法
- C#中关于Attribute的基本用法
- attribute 用法 section 部分
- attribute 用法 section 部分
- attribute 用法 section 部分
- attribute 用法 section 部分
- attribute 用法[转]
- attribute 用法 section 部分
- attribute 用法 section 部分
- attribute 用法 section 部分
- 写自定义标签时标记attribute里rtexprvalue的用法
- c#中特性的用法 Attribute (转)
- 照片处理小工具三合一设计到实现(二)
- 横向菜单
- Json与List的相互转换
- 用于设置和管理路由的路由器配置示例
- 2.如何使用设计模式
- attribute的用法
- Android | Fragement的onCreateView
- Linux下C/C++对MySQL数据库操作
- 过滤器的简单使用案例
- 常用Linux指令汇总
- 欢迎使用CSDN-markdown编辑器
- Android 异步消息处理机制之Handler、Message、Looper
- 第九周项目二C/C++二叉树遍历的递归算法
- 第十一周——图基本算法库