[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #13705] possible memory leak in setStringValue
From: |
Fred Kiefer |
Subject: |
[bug #13705] possible memory leak in setStringValue |
Date: |
Sun, 10 Jul 2005 09:07:19 +0000 |
User-agent: |
Mozilla/5.0 (compatible; Konqueror/3.4; Linux) KHTML/3.4.0 (like Gecko) |
Follow-up Comment #2, bug #13705 (project gnustep):
As this looks like an important problem I tried hard to reproduce it with a
simple program, but failed to.
A small loop made up of the lines you posted does not produce a memory leak:
int main (int argc, const char *argv[])
{
int i;
NSString *speedStr;
NSTextField *infoSpeed;
CREATE_AUTORELEASE_POOL(pool);
[NSApplication sharedApplication];
infoSpeed = [[NSTextField alloc] init];
for (i = 0; i < 1000000; i++)
{
speedStr = [NSString alloc];
speedStr = [speedStr initWithFormat:@"%3.2fB/s", i * 0.1234];
[infoSpeed setStringValue:speedStr];
[speedStr release];
}
RELEASE(pool);
return 0;
}
Are you using a formatter for the text field?
It may also be that the leak is in the text rendering mechanism which doesn't
get used by my code.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=13705>
_______________________________________________
Nachricht geschickt von/durch Savannah
http://savannah.gnu.org/