why does this leak?
why does this leak?
- Subject: why does this leak?
- From: Robert Dell <email@hidden>
- Date: Mon, 13 Feb 2006 18:41:04 -0500
if somebody tells me THIS is not a cocoa question, i'll simply stop getting this list.
I update my menus by first removing the items. I used the following code:
while ([mySingMenu numberOfItems] > 0)
{
[mySingMenu removeItemAtIndex: 0];
};
From what i was told on this list, removing items from the list automatically releases them. why is it i get 2 leaks per remove without a predeclared release as such?
while ([mySingMenu numberOfItems] > 0)
{
[[mySingMenu itemAtIndex: 0] release];
[mySingMenu removeItemAtIndex: 0];
};
robert
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden