Re: Debugger launched after closing the app window.
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:46:51 +0100
Hi again me, I forgot to tell you that in my "business" controller,
the one in charge of handling the operations between the 2 views I
implemented a singleton pattern, but dunno if I should release the
static variable I use to create the singleton.
The app is a Naval Battle gameboard. so the 2 vies is one for the
player and one for the opponent (which so far is the computer), later
on will be another player over the network.
THX
G
On 7.12.2008, at 15:41, Gustavo Pizano wrote:
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