926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
|
}
void
objc_unregisterClass(Class class)
{
static SEL unloadSel = NULL;
if (unloadSel == NULL)
unloadSel = sel_registerName("unload");
while (class->subclassList != NULL && class->subclassList[0] != Nil)
objc_unregisterClass(class->subclassList[0]);
if (class->info & OBJC_CLASS_INFO_LOADED)
callSelector(class, unloadSel);
objc_hashtable_delete(classes, class->name);
if (strcmp(class_getName(class), "Protocol") != 0)
classesCount--;
unregisterClass(class);
unregisterClass(class->isa);
}
void
objc_unregisterAllClasses(void)
{
if (classes == NULL)
return;
|
>
>
>
>
|
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
|
}
void
objc_unregisterClass(Class class)
{
static SEL unloadSel = NULL;
objc_globalMutex_lock();
if (unloadSel == NULL)
unloadSel = sel_registerName("unload");
while (class->subclassList != NULL && class->subclassList[0] != Nil)
objc_unregisterClass(class->subclassList[0]);
if (class->info & OBJC_CLASS_INFO_LOADED)
callSelector(class, unloadSel);
objc_hashtable_delete(classes, class->name);
if (strcmp(class_getName(class), "Protocol") != 0)
classesCount--;
unregisterClass(class);
unregisterClass(class->isa);
objc_globalMutex_unlock();
}
void
objc_unregisterAllClasses(void)
{
if (classes == NULL)
return;
|