aspect_deregisterTrackedSelector
hejunm opened this issue · comments
hejunm commented
In aspect_deregisterTrackedSelector(id self, SEL selector){} method,
after perform the code below,
if (tracker.selectorNames.count == 0 && tracker.selectorNamesToSubclassTrackers) {
[swizzledClassesDict removeObjectForKey:currentClass];
}
aspect can't promise " A method can only be hooked once per class hierarchy."
I think the code should be:
if (tracker.selectorNames.count == 0 && tracker.selectorNamesToSubclassTrackers.count == 0) {
[swizzledClassesDict removeObjectForKey:currentClass];
}