当前位置:网站首页>Classification of blocks
Classification of blocks
2022-07-19 14:37:00 【InfoQ】
Block The classification of
NSConcreteGlobalBlockGlobal staticblock, No external variables will be accessed .
NSConcreteStackBlockIn the stackblock, When the function returns, it is destroyed .
NSConcreteMallocBlockKept in a heapblock, When the reference count is 0 Will be destroyed .
NSConcreteGlobalBlock Type of block The implementation of the
void (^testGlobalBlock)() = ^{
NSLog(@"hello block");
};
int main(int argc, const char * argv[]) {
testGlobalBlock();
return 0;
}
isa_NSConcreteGlobalBlockblockNSConcreteStackBlock Type of block The implementation of the
int main(int argc, const char * argv[]) {
void (^testStackBlock)() = ^{
NSLog(@"hello block");
};
testStackBlock();
return 0;
}
isa_NSConcreteStackBlockNSConcreteMallocBlock Type of block The implementation of the
int main(int argc, const char * argv[]) {
void (^testStackBlock)() = [^{
NSLog(@"hello block");
} copy];
testStackBlock();
return 0;
}
NSConcreteMallocBlockblock_NSConcreteStackBlockblockblockcopyblockisa_NSConcreteMallocBlockblockblockblock边栏推荐
- 单片机软件定时器V2.0
- 抽象类与派生类
- 單片機軟件定時器V2.0
- 数据库的增删改查
- Redis源码与设计剖析 -- 2.链表
- After 2000, he was hired as a special associate researcher of Nanjing University. He went to primary school at the age of 4 and was admitted to Nanjing University at the age of 14!
- 华为无线设备配置用户CAC
- Codeforces Round #808 (Div. 1)(A~C)
- Excellent jar package startup shell script collection
- Alibaba microservice component Nacos registry
猜你喜欢

4 a company has branches in six cities C1, C2, C3... C6. The connection between cities Ci and CJ (I, j=1,2,3,... 6) and the cost are listed in the following weighted adjacency matrix C

CF 807 E. Mark and Professor Koro(权值线段树)

TongWeb生产系统应急处理方案

How to avoid global index in pychart? How to cancel the indexing of a folder?

Huawei Technologies:Jonatan Krolikowski | 从设计到部署零接触深度强化学习WLANs

Code Runner for VS Code,下载量突破 4000 万!支持超过50种语言

详解C语言文件操作

Huawei wireless device configuration user CAC

Redis source code and design analysis -- 3 Dictionaries

Class 3 practice
随机推荐
同一宿主机不同容器网络通信流程分析
C - pointer
06--- characteristics of light in media
Notes with a face value of 10exp (303)
05--- antireflective film
慎用TongWeb的热部署功能
Manuel incomplet, comment tracer manuellement l'information de surveillance de tongweb?
Huawei Technologies:Jonatan Krolikowski | 从设计到部署零接触深度强化学习WLANs
华为无线设备配置动态负载均衡
Alibaba微服务组件Nacos注册中心
Redis源码与设计剖析 -- 4.跳跃表
Alibaba microservice component Nacos registry
Rotation formula of coordinate simulation matrix
Méthode de compilation de la courbe RPS d'O'Neill (originale par le Dr Tao)
非凸優化問題經典必看綜述“從對稱性到幾何性”,羅切斯特大學等
Unity subtitle scrolling
Huawei wireless devices are configured with static load balancing
Excellent jar package startup shell script collection
ClassNotFoundException:com. tongweb. geronimo. osgi. locator. ProviderLocator
Logu: p4516 [jsoi2018] stealth action (tree DP, tree grouping knapsack statistical scheme number)