• 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: Debugger launched after closing the app window.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Debugger launched after closing the app window.


  • Subject: Re: Debugger launched after closing the app window.
  • From: Gustavo Pizano <email@hidden>
  • Date: Sun, 7 Dec 2008 15:41:59 +0100

Hi Tim.

the overview, I have the main window which has 3 Custom views, 2 of them are subclasses of a NSView.
What Im doing, after reading the memory management rules, is that for all the instances variables which are pointers and which Im allocating memory for them in some part of the code, Im releasing them on the dealloc method, but never assigning them to nil after. But it what Im thinking about is that this wasn't happening before, and Im going back to were I was , commenting the new stuff I added and the problem persist.


Im kinda new to cocoa development but let me know what else specifically can I provide you to help me solve this issue.

Gustavo.

Im gonna try assigning the IV to nil.
On 7.12.2008, at 15:13, Tim Isted wrote:

Hi Gustavo,

One suggestion - are you using a custom view or have you got some bindings set up?

It might be that something in your code is trying to access an object that has been released... If you use the dealloc method on a window or in custom objects etc to release attributes on a window controller/object, particularly if a window is closed, make sure you then set the pointer to nil - eg:

- (void)dealloc
{
	[_someObject release];
	_someObject = nil;
}

Otherwise, perhaps you could give us a little more information about your code - ie are you using Core Data/window controllers/a document- based app etc?

Hope this might be a first step to solving the problem!
Tim


-- http://www.timisted.net Twitter: timisted

Are you registered for MacDev 2009 Europe?
The conference for Macintosh Developers in Europe, taking place from April 15th to April 17th, 2009.
For details and to register, visit: http://www.macdeveurope.com
Christmas Special for December - register and receive over £40-worth of developer software!



On 7 Dec 2008, at 13:47, Gustavo Pizano wrote:

Hello Everybody.

I dunno why, but I have been looking into the the list for the answer and hadn't been able to find the solution. Sometimes when I close the main window of the app, the debugger its loaded, I have been checking my code looking for unreleased objects thinking this might be the cause, can some body explaing me why is this happening. It happens only if I close the main window from the red X button, it doesn't happens if I go to the app menu and click on the Quit label.


Thanks

Best regards


Gustavo

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Debugger launched after closing the app window.
      • From: Gustavo Pizano <email@hidden>
References: 
 >Debugger launched after closing the app window. (From: Gustavo Pizano <email@hidden>)

  • Prev by Date: Access to this item is restricted?
  • Next by Date: Re: Debugger launched after closing the app window.
  • Previous by thread: Debugger launched after closing the app window.
  • Next by thread: Re: Debugger launched after closing the app window.
  • Index(es):
    • Date
    • Thread