Here is the error I am getting
Thread 1:EXC_BAD_ACCESS (code=2, address=0xb7ffffc)
On this line
[[NSNotificationCenter defaultCenter] postNotificationName:AsyncImageLoadDidFinish
object:target
userInfo:[[userInfo copy] autorelease]];
In the AsyncImageView.m file.
The error stops the code but if I continue in debugger it freezes Xcode and shuts it down. How can I fix this issue?
In init you need to register, and in dealloc you need to un register!
-(void)dealloc
{
[[NSNotificationCenter defaultCenter] removeObserver:self name:AsyncImageLoadDidFinish object:nil];
OR
- (void)dealloc
{
[[NSNotificationCenter defaultCenter] removeObserver:self];
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With