Objective-C and Cocoa : crash when calling a class function without entering the function
- by Oliver
Hello,
I have a class function (declared and implemented) in a class MyUtils :
+ (NSString*) theFunction:(NSString*)param1 param2:(NSString*)param2 param3:(NSString*)param3;
When I call this function, with :
NSString *item = [MyUtils theFunction:@"abc" param2:aPreviousNSString param3:@"xyz";
my app crashes. In the debugger I have a breakpoint on the first action of the "theFunction" function. And this breakpoint is never reached.
If I replace the call by NSString *item = @"youyou"; then everything is ok.
Forcing a retain on aPreviousNSString before the call does not change anything.
Do you have an idea of what is happening ?
Thanks