I did "Build and analysis" in xCode and got a "Dereference of null pointer" when setting the normal int to 0 in my init method. I noticed in my code below for which line I am receiving the message. I am developing for the iPhone.
Bric.m
#import "Bric.h" @implementation Bric - (id)initWithImage:(UIImage *)img:(NSString*)clr{ if (self = [super init]) { image = [[UIImageView alloc] initWithImage:img]; } stepX = 0;
Bric.h
This is not the complete code inserted, in my opinion, useful.
Since I do not use a pointer, I find it rather strange. Why did I receive this message?
Thanks and Regards, Niklas
debugging objective-c iphone xcode code-analysis
Nicsoft
source share