BloodMagic icon indicating copy to clipboard operation
BloodMagic copied to clipboard

Removed unused weak pointer to target

Open k06a opened this issue 8 years ago • 4 comments

It crashes app if trying to access injected property right in object dealloc

k06a avatar Mar 27 '16 13:03 k06a

@k06a could you provide an example project? I want to investigate first.

AlexDenisov avatar Mar 27 '16 15:03 AlexDenisov

Ok, I'll provide it in a few days. Can you comment what weakSender is doing in this code? Looks like weakness is really have no influence in that exact place.

k06a avatar Mar 27 '16 16:03 k06a

Here is problem description with weak pointer creation in dealloc: http://stackoverflow.com/questions/19907616/how-can-i-reference-weak-self-in-dealloc-method

k06a avatar Mar 27 '16 22:03 k06a

Creating __weak from __strong to create __strong again when passing argument to block is really useless, but cause a crash if occurs in sender's dealloc.

k06a avatar Sep 28 '16 08:09 k06a