It looks like you're new here. If you want to get involved, click one of these buttons!
A local variable will not be set to null when a function or method exits. It will simply cease to exist. You can't reference it outside the method, and the next time you enter that method a brand new instance of that local variable will be created which will have absolutely nothing to do with the previous instance. If it has an initializer as you have shown then it will be initialized upon entry.I read that in C - if you have an local variable declared inside a function. After that function ends the variables set inside that function looses its value. So say you have an "int name = 100;" after the function ends that will be set to null.
Is it the same for instance methods in objective-C? if I declare "int name = 100" after that instance method is ended will it be set to null? unless i make it a static variable?