There are some differences between the two. objc_msgSend (sendMessage:) is because the method is called on the released object.
capturing self strongly in this block is likely to lead to a retain cycle which will cause the created object to not be released. For example, every time you enter a vc, it is newly created. The block in vc has a strong reference to self. This will cause this vc to be unable to be released. A new vc will be created every time you enter, and the old vc will still exist. Finally, the application will be cleared by the system because it takes up too much memory.
This will cause a memory leak, but whether it will cause a crash depends on the situation. For example, a certain VC registered a notification, but due to a circular reference, it was not released correctly. After that, the notification was posted elsewhere, then the VC will perform the corresponding operation. Maybe it operates The thing has been released, then it may crash. It is difficult to locate errors like your libobjc.A.dylib objc_msgSend (sendMessage:). You should see if there is other information, such as something similar to this:
There are some differences between the two.
objc_msgSend (sendMessage:) is because the method is called on the released object.
capturing self strongly in this block is likely to lead to a retain cycle
which will cause the created object to not be released.
For example, every time you enter a vc, it is newly created. The block in vc has a strong reference to self.
This will cause this vc to be unable to be released. A new vc will be created every time you enter, and the old vc will still exist. Finally, the application will be cleared by the system because it takes up too much memory.
It is possible, but it is unlikely, but the circular reference must be removed.
This will cause a memory leak, but whether it will cause a crash depends on the situation.
For example, a certain VC registered a notification, but due to a circular reference, it was not released correctly. After that, the notification was posted elsewhere, then the VC will perform the corresponding operation. Maybe it operates The thing has been released, then it may crash.
It is difficult to locate errors like your libobjc.A.dylib objc_msgSend (sendMessage:). You should see if there is other information, such as something similar to this:
You can try using Fabric.