Re: Problem with text in buttons

2013-01-07 Thread Riccardo Mottola
Hi, Fred Kiefer wrote: It turns out that this problem was caused by a change I made in the horizontal typesetter. There when the width of the text container is above 1e7 we now ignore the alignment attribute, just as Apple does. This change is correct, but it requires an additional change in th

big memory leak in GSString

2013-01-07 Thread Pirmin Braun
Dear Developers, in Rev 23291 of GSString when you create Strings with [NSArray componentsSeparatedByString:] the resulting GSCSubString objects have a retain-count of 2 (see attached code). With WebObjects on Windows the retain-count is 1. This makes a 200 MB difference when starting our App.

Re: big memory leak in GSString

2013-01-07 Thread Tom Davie
On 7 Jan 2013, at 21:11, Pirmin Braun wrote: > Dear Developers, > > in Rev 23291 of GSString when you create Strings with [NSArray > componentsSeparatedByString:] the resulting GSCSubString objects have a > retain-count of 2 (see attached code). With WebObjects on Windows the > retain-count

Re: big memory leak in GSString

2013-01-07 Thread Pirmin Braun
Am Mon, 7 Jan 2013 22:00:40 + schrieb Tom Davie : > Retain count means nothing. It may well have a retain count of 2, but be in > the autorelease pool twice. Can you confirm that these actually are never > released, and provide a small test case that demonstrates it? > I've tried this,

Re: big memory leak in GSString

2013-01-07 Thread Tom Davie
On 7 Jan 2013, at 22:15, Pirmin Braun wrote: > Am Mon, 7 Jan 2013 22:00:40 + > schrieb Tom Davie : > >> Retain count means nothing. It may well have a retain count of 2, but be in >> the autorelease pool twice. Can you confirm that these actually are never >> released, and provide a sm

Re: big memory leak in GSString

2013-01-07 Thread Pirmin Braun
Am Mon, 7 Jan 2013 22:28:13 + schrieb Tom Davie : > Instead, simply try to reduce this to a simple test case in which the string > is not deallocated, yet all autorelease pools have been popped, and all > allocs/retains balanced. > ok, here I've got a simple test: svn checkout -r HEAD --n

Re: big memory leak in GSString

2013-01-07 Thread Tom Davie
On 7 Jan 2013, at 22:50, Pirmin Braun wrote: > Am Mon, 7 Jan 2013 22:28:13 + > schrieb Tom Davie : > >> Instead, simply try to reduce this to a simple test case in which the string >> is not deallocated, yet all autorelease pools have been popped, and all >> allocs/retains balanced. >>

Re: big memory leak in GSString

2013-01-07 Thread Pirmin Braun
Am Mon, 7 Jan 2013 23:06:22 + schrieb Tom Davie : > > On 7 Jan 2013, at 22:50, Pirmin Braun wrote: > > > Am Mon, 7 Jan 2013 22:28:13 + > > schrieb Tom Davie : > > > >> Instead, simply try to reduce this to a simple test case in which the > >> string is not deallocated, yet all autor

Re: big memory leak in GSString

2013-01-07 Thread Pirmin Braun
I've extended the test to reflect what happens in our App and now the problem shows: Code: #import int main(int argc, char **argv) { NSString *s = @"fi-rst|sec-ond|thi-rd",*s1; NSArray *a,*a1; NSAutoreleasePool *pool =[NSAutoreleasePool new]; a = [s componentsSeparatedByString:

Re: big memory leak in GSString

2013-01-07 Thread David Chisnall
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