On 8 Jan 2013, at 00:28, Pirmin Braun wrote: > the substrings of a substring retain their string from which they where > splitted off; > when those 2nd generation substrings are retained, the 1st generation > substrings won't get deallocated; > but they should, they are just intermediate objects;
Yes ... I see what you mean. It's certainly not a leak and not a bug: clearly you can work around ... decrease memory usage ... by copying the substrings and then emptying the autorelease pool that contains all the substrings, so that they get released earlier rather than later. However, the fact that the Apple behavior allows intermediate strings to be released earlier in some circumstances is a good thing (with no downside that I can see). So I modified the code in svn trunk to match the Apple behavior. _______________________________________________ Gnustep-dev mailing list Gnustep-dev@gnu.org https://lists.gnu.org/mailman/listinfo/gnustep-dev