Previously dealloc was swizzled by adding a separate method and then using objc_msgSend to invoke the original implementation. This approach not only simplifies the swizzling to avoid adding an extra method, but also does two things:
1) Specifies self parameter as __unsafe_unretained in the swizzling IMP
2) Invokes the original IMP directly without objc_msgSend
Previously dealloc was swizzled by adding a separate method and then using
objc_msgSend
to invoke the original implementation. This approach not only simplifies the swizzling to avoid adding an extra method, but also does two things: 1) Specifiesself
parameter as__unsafe_unretained
in the swizzling IMP 2) Invokes the original IMP directly withoutobjc_msgSend