 <p>this code looks correct, are you sure the crash isn't somewhere else?</p> <hr> <p>EDIT: as noted in the comments, <code>NSString</code> being immutable won't cause the <code>copy</code> to allocate a new object. I've edited the answer for the mutable case, just in case someone stumbles into this later and doesn't read the whole thing. Now back with our regular programming.</p> <hr> <p>Don't know if this might be the problem, but note that, if you were using a mutable object like NSMutableString, with <code>copy</code> you would not increment the retain count, you would effectively create a new object, so what would happen:</p> <pre><code>NSMutableString* newString = [[NSMutableString alloc] init..]; // allocate a new mutable string self.originalString=newString; // this will create yet another string object // so at this point you have 2 string objects. [newString relase]; //this will in fact dealloc the first object // so now you have a new object stored in originalString, but the object pointed // to by newString is no longer in memory. // if you try to use newString here instead of self.originalString, // it can indeed crash. // after you release something, it's a good idea to set it to nil to // avoid that kind of thing newString = nil; </code></pre>