• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How do you create a NSTabViewItem containing NSImageView programmatically? I almost got it...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
References: 
 >How do you create a NSTabViewItem containing NSImageView programmatically? I almost got it... (From: "Frederick C. Lee" <email@hidden>)

  • Prev by Date: Re: Cocoa & Excel
  • Next by Date: Re: Array of dictionaries + NSUserDefaultsController
  • Previous by thread: How do you create a NSTabViewItem containing NSImageView programmatically? I almost got it...
  • Next by thread: Re: How do you create a NSTabViewItem containing NSImageView programmatically? I almost got it...
  • Index(es):
    • Date
    • Thread