• 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: View deallocation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: View deallocation


  • Subject: Re: View deallocation
  • From: Eric Wang <email@hidden>
  • Date: Fri, 27 Jun 2003 14:06:40 -0400

on 6/27/03 1:01 PM, Neil Earnshaw at email@hidden wrote:

> I've just created a new project using the PB Cocoa Application
> template. Then I went into IB and stuck a custom view in the window.
> The custom view was just a subtype of NSView with no extra features. I
> saved that lot and added
>
> -(void)dealloc
> {
> NSLog(@"dealloced");
> [super dealloc];
> }
>
> I ran the application and closed the window. The log message was not
> printed. If I run the app in ObjectAlloc the view's count remains 1
> when I close the window.
>
> Shouldn't the view be dealloc'd?
>
> Neil


Hi Neil,

Did you check the "Release when closed" checkbox for the window in IB? If
you aren't using NSWindowController to manage the window, you'll have to
release the window yourself after you're done with it.

Eric Wang
_______________________________________________
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.

References: 
 >View deallocation (From: Neil Earnshaw <email@hidden>)

  • Prev by Date: Re: [OT] Re: New Panther UI Widgets?
  • Next by Date: Re: [OT] Re: New Panther UI Widgets?
  • Previous by thread: View deallocation
  • Next by thread: re Where's my "New Folder" button?
  • Index(es):
    • Date
    • Thread