NSString or NSMutableString?
NSString or NSMutableString?
- Subject: NSString or NSMutableString?
- From: Lorenzo Puleo <email@hidden>
- Date: Sat, 22 Jun 2002 10:29:57 +0200
Hi,
I have a variable instance NSString "gErrString".
After the first assignment in the awakeFromNib routine:
gErrString = @"something";
I use that several times to compile a log report this way:
gErrString = [gErrString stringByAppendingString:@"something"];
So, at the I get a very large string. I want this. But...
Could this cause a lack of memory?
Could this produce several, say, "pointers", lost in the memory space?
Should I have to use instead a NSMutableString? e.g.
In the first assignment in the awakeFromNib routine:
gErrString = [NSMutableString stringWithCapacity:0];
[gErrString setString:@""];
and then set it for several times? e.g.
[gErrString appendString:@"something"];
Any assistance would be appreciated. Thanks.
--
Lorenzo Puleo
mailto:email@hidden
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.