Re: data formatter running before object is allocated
Re: data formatter running before object is allocated
- Subject: Re: data formatter running before object is allocated
- From: Steve Christensen <email@hidden>
- Date: Fri, 10 Jan 2014 11:27:19 -0800
Do you have your debug variables area set to display All, Local or Auto? If not Auto then Xcode will display all the variables, initialized or not.
On Jan 10, 2014, at 7:29 AM, Steve Mills <email@hidden> wrote:
> Has anybody else seen problems with a data formatter (right-click variable, Edit Summary Format…) being called before the object has actually been allocated? This is happening for me in 5.0.2 when a variable is declared *not* at the top of a block of code:
>
> void Class::Method(void)
> {
> if(something) {
> Stuff();
> MoreStuff();
>
> MyThing thing;
>
> thing.run();
> MostStuff();
> }
> }
>
> As soon as I step into the if() block, the formatter for MyThing runs, which is not legal, because it hasn't been allocated, so its member variables are uninitted and garbage. Bug or is there a way to prevent that in the data formatter?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden