Is stringByTrimmingCharactersInSet: an autoreleased string?
Posted
by David.Chu.ca
on Stack Overflow
See other posts from Stack Overflow
or by David.Chu.ca
Published on 2010-04-21T04:06:49Z
Indexed on
2010/04/21
4:13 UTC
Read the original article
Hit count: 307
iphone-sdk
I can use the following codes to trim a string:
-(void) aMethod {
// myStr from a text box
NSString *trimedStr = [mystr stringByTrimmingCharactersInSet:
[NSCharacterSet whitespaceAndNewlineCharacterSet]];
...
// should I release trimedStr?
}
Not sure if the result trimedStr is an autorelease string? How can I find out that?
© Stack Overflow or respective owner