Re: Moderated post on self going out of scope
Re: Moderated post on self going out of scope
- Subject: Re: Moderated post on self going out of scope
- From: Ken Thomases <email@hidden>
- Date: Mon, 18 Jan 2010 21:28:09 -0600
On Jan 18, 2010, at 9:17 PM, David Blanton wrote:
> In a view IBAction I instance a C++ class. As soon as the class is instanced, self in the variables window, goes to 0x0 !
Try logging the value of self, rather than relying on the debugger display. The debugger can sometimes be wrong.
Otherwise, make sure the constructor of your C++ class isn't trashing memory. Sounds like writing past the bounds of a stack variable.
If you're doing placement new, you might also be messing that up.
You could try compiling with -fstack-protector-all to try to detect stack smashers closer to where/when they happen.
Regards,
Ken
_______________________________________________
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