Re: How do you create a NSTabViewItem containing NSImageView programmatically? I almost got it...
Re: How do you create a NSTabViewItem containing NSImageView programmatically? I almost got it...
- Subject: Re: How do you create a NSTabViewItem containing NSImageView programmatically? I almost got it...
- From: "M. Uli Kusterer" <email@hidden>
- Date: Fri, 22 Oct 2004 02:33:32 +0200
At 12:59 Uhr -0700 21.10.2004, Frederick C. Lee wrote:
case 2:
mapImage3_View = [[NSImageView alloc] initWithFrame:defaultFrame];
[mapImage3_View setImage:theImage];
NSTabViewItem *theItem = [map_TabView tabViewItemAtIndex:2];
[theItem setView:mapImage3_View];
[theItem setLabel:@"Three"];
[theItem release];
break;
case 3:
...
...
default:
break;
}
...
Ummm... you're releasing theItem. What makes you think you can
release a tab view item that you retrieved using tabViewItemAtIndex:?
The method name contains neither alloc/init, nor copy, nor retain.
And the API also isn't documented as being an exception that requires
the caller to release of anything.
Executable "ricCountries" has exited due to signal 10 (SIGBUS).
Yes. a Bus error is what you usually get when some part of your
program expects it can still use some memory that has already been
released.
--
Cheers,
M. Uli Kusterer
------------------------------------------------------------
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
_______________________________________________
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