【文件属性】:
文件名称:objc_instance_finder:在运行时查找 objc 类的实例
文件大小:5KB
文件格式:ZIP
更新时间:2021-07-03 19:12:59
Objective-C
对象实例查找器
在运行时查找 objc 类的实例
提供一个具有以下声明的函数:
NSHashTable *find_instances_of_class(Class class, BOOL include_subclasses);
第一个参数应该是一个 Objective-C 类,你想找到它的所有实例。
第二个参数指定是否要递归地包含该类的子类。
返回一个 NSHashTable 实例,其中包含对所有找到的实例的弱引用。
示例用法
@implemenation TestClass : NSObject @end
@interface TestClass @end
TestClass *obj1 = [TestClass new];
NSHashTable *instances = find_instances_of_class([TestClass class], NO);
T
【文件预览】:
objc_instance_finder-master
----test()
--------Makefile(165B)
--------test.m(2KB)
----README.md(1KB)
----Makefile(338B)
----objc_instance_finder.m(3KB)
----.gitignore(15B)
----objc_instance_finder.h(76B)