Why does this leak memory?
Why does this leak memory?
- Subject: Why does this leak memory?
- From: Jamie Curmi <email@hidden>
- Date: Sat, 18 Jan 2003 23:59:33 +1100
Hi All,
Maybe this is a stupid question. Could someone tell me why the
following code leaks memory (under 10.2.3)?
NSImage * icon = [[NSImage imageNamed:@"Connected"] copy];
[icon release];
Of course, that isn't what my program does. But my program leaks, and
I've simplified it down to that. I thought that the "release" would
cleanup the copy of the icon I've made, but that doesn't seem to be the
case.
Can someone explain this?
Any help appreciated.
Jamie
_______________________________________________
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.