Obj c for loop showing out of scope on variable
I am trying to write a for loop in Obj-c and getting 'out of scope' on my var
for ( myObject *i in blah ) {
i.somevar 开发者_Python百科<--- i showing out of scope in debug mode.
}
myObject
should be MyObject
; class names are capitalized in Objective-C.
If you are building for Release, the optimizer is on and it could easily be optimizing away i
.
精彩评论