On 22 Sep 2013, at 00:38, "Mills, Steve" <[email protected]> wrote:

>> On Sep 21, 2013, at 12:24, "Gerriet M. Denkmann" <[email protected]> 
>> wrote:
>> 
>> 1. tupelsP lives outside the block
> 
> Because once the block containing the array exits scope, so does the memory 
> of the array. tuplesP is pointing to memory that is no longer valid.

Ok. I am convinced. 
But why no compiler error? Like: "assigning a global pointer to local storage 
is illegal"?

I have changed my code accordingly and all is fine.

Kind regards,

Gerriet.



_______________________________________________

Cocoa-dev mailing list ([email protected])

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to