Follow-up Comment #1, bug #25572 (project gnustep): GNUstep really should be doing more copying when setting or returning instance variables. This is out of question. Your specific solution may not the the most efficient one. I will probably replace return [NSString stringWithString:_directory]; with return AUTORELEASE([_directory copy]);
Here immutable subclasses of NSString may decide to not copy themselves and in your case a new object is created every time. On the other hand your application is also at fault, it relies on the fact that an object returned by a method will stay around. This is never guarrantied, you always need to retain objects yourself, when you need to use them later on. _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?25572> _______________________________________________ Nachricht geschickt von/durch Savannah http://savannah.gnu.org/ _______________________________________________ Bug-gnustep mailing list Bug-gnustep@gnu.org http://lists.gnu.org/mailman/listinfo/bug-gnustep