This is to prevent an issue where an instance of a packet could be release by the (last) owner – which would lead to the object being deallocated – in the middle of the performRead: message call.
This would lead to a bad access when the object attempts to access self later on in the execution of the method.
I was only able to observe this issue in AFHTTPHeadersPacket but given that the pattern is replicated in other packet subclasses it’s probably wise to prevent a similar issue.
This is to prevent an issue where an instance of a packet could be release by the (last) owner – which would lead to the object being deallocated – in the middle of the
performRead:
message call.This would lead to a bad access when the object attempts to access self later on in the execution of the method.