ARC模式下 忽略选择器的警告

本文详细介绍了如何在Objective-C ARC模式下通过增加限制代码来忽略选择器产生的内存泄漏警告,包括使用`#pragma clang diagnostic push`和`#pragma clang diagnostic ignored`指令来收集和忽略警告,并提供了具体实现示例。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

在ARC模式下忽略 选择器 这个警告,可以通过增加限免的代码来实现

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Warc-performSelector-leaks"
                

#pragma clang diagnostic pop

具体的实例如下


#pragma clang diagnostic push//收集警告
#pragma clang diagnostic ignored "-Warc-performSelector-leaks"//忽略掉arc下面 performSelector产生的leaks 的警告
        //把方法名转化为选择器 @selector(方法名);
        SEL sel = @selector(run);
        
        if ([dog respondsToSelector:sel]) {
            //执行选择器 调用选择器表示的方法
            [dog performSelector:sel];
        }else {
            NSLog(@"- run 方法没有实现 ");
        }
        
#pragma clang diagnostic pop //用完SEL之后加上 这句

忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 忽略不支持的对象: BlockReference 对象类型统计: 直线=32, 多段线分段=0, 其他=664 提取到 32 条网格线 线段长度范围: 1500.0mm - 93600.0mm 线段长度 19500.0mm 不匹配任何标准长度 (最接近: 2400mm) 线段长度 8100.0mm 不匹配任何标准长度 (最接近: 2400mm) 线段长度 9900.0mm 不匹配任何标准长度 (最接近: 2400mm) 线段长度 8100.0mm 不匹配任何标准长度 (最接近: 2400mm) 线段长度 9900.0mm 不匹配任何标准长度 (最接近: 2400mm) 线段长度 11400.0mm 不匹配任何标准长度 (最接近: 2400mm) 线段长度 11400.0mm 不匹配任何标准长度 (最接近: 2400mm) 线段长度 11400.0mm 不匹配任何标准长度 (最接近: 2400mm) 线段长度 11400.0mm 不匹配任何标准长度 (最接近: 2400mm) 线段长度 11400.0mm 不匹配任何标准长度 (最接近: 2400mm) 线段长度 11400.0mm 不匹配任何标准长度 (最接近: 2400mm) 线段长度 11400.0mm 不匹配任何标准长度 (最接近: 2400mm) 线段长度 11400.0mm 不匹配任何标准长度 (最接近: 2400mm) 线段长度 11400.0mm 不匹配任何标准长度 (最接近: 2400mm) 线段长度 11400.0mm 不匹配任何标准长度 (最接近: 2400mm) 线段长度 11400.0mm 不匹配任何标准长度 (最接近: 2400mm) 线段长度 11400.0mm 不匹配任何标准长度 (最接近: 2400mm) 线段长度 93600.0mm 不匹配任何标准长度 (最接近: 2400mm) 线段长度 15000.0mm 不匹配任何标准长度 (最接近: 2400mm) 线段长度 15000.0mm 不匹配任何标准长度 (最接近: 2400mm) 线段长度 93600.0mm 不匹配任何标准长度 (最接近: 2400mm) 线段长度 17700.0mm 不匹配任何标准长度 (最接近: 2400mm) 线段长度 92100.0mm 不匹配任何标准长度 (最接近: 2400mm) 线段长度 92100.0mm 不匹配任何标准长度 (最接近: 2400mm) 线段长度 17700.0mm 不匹配任何标准长度 (最接近: 2400mm) 线段长度 93600.0mm 不匹配任何标准长度 (最接近: 2400mm) 线段长度 19500.0mm 不匹配任何标准长度 (最接近: 2400mm) 线段长度 93600.0mm 不匹配任何标准长度 (最接近: 2400mm) 线段长度 93600.0mm 不匹配任何标准长度 (最接近: 2400mm) 线段长度 93600.0mm 不匹配任何标准长度 (最接近: 2400mm) 线段长度 93600.0mm 不匹配任何标准长度 (最接近: 2400mm) 过滤统计: 总线段=32, 有效=1, 过短=0, 不匹配=31 有效线段数量: 1 (长度>300mm且匹配标准长度) 应用模式后需布置线段: 1 警告: 块文件不存在 - C:\Users\卓越生活\Desktop\平面斜拉杆布置\平面斜拉杆布置\bin\Debug\ScaffoldBlocks\ScaffoldPolexie水平杆300mm.dwg忽略块 _ArchTick 的重复定义。 已加载块定义: ScaffoldPolexie水平杆600mm忽略块 _DIMX 的重复定义。 忽略块 _ArchTick 的重复定义。 忽略块 20250710140208958 的重复定义。 忽略块 20250710140221253 的重复定义。 已加载块定义: ScaffoldPolexie水平杆900mm忽略块 _DIMX 的重复定义。 忽略块 _ArchTick 的重复定义。 忽略块 20250710140208958 的重复定义。 忽略块 20250710140221253 的重复定义。 已加载块定义: ScaffoldPolexie水平杆1200mm忽略块 _DIMX 的重复定义。 忽略块 _ArchTick 的重复定义。 已加载块定义: ScaffoldPolexie水平杆1500mm忽略块 _DIMX 的重复定义。 忽略块 _ArchTick 的重复定义。 忽略块 20250710140208958 的重复定义。 忽略块 20250710140221253 的重复定义。 已加载块定义: ScaffoldPolexie水平杆1800mm 警告: 块文件不存在 - C:\Users\卓越生活\Desktop\平面斜拉杆布置\平面斜拉杆布置\bin\Debug\ScaffoldBlocks\ScaffoldPolexie水平杆2400mm.dwg 水平杆长度统计: 1500mm: 1根 成功布置 1 根水平杆 水平杆尺寸为:600mm,900mm,1200mm,1500mm,1800mm 应该按网格的两交点之间线段长匹配水平杆尺寸布置
最新发布
07-12
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值