I am still in my 1st year of learning so bear with me.
I finally got this part of my program working, but I am not sure why. I have a method which creates a small report in a NSString* which is later shown in a window.
I do something like this:
NSString* rpt = @"#session( \r";
and then multiple lines of the sort:
rpt = [rpt stringByAppendingString : objectString]; where objectString is built up in a similar way to make an report record.
finally I return rpt.
However it seems from my reading I should give a "[rpt autorelease]" before I return, but if I do I get a double release error. I can not find anything in the documentation or my many books explaining how rpt gets into the autorelease pool automatically, but I guess it does. And I probably missed it. Could someone give me a reference or a general rule when this happens.
|