I am so used to ARC that I am not 100% sure about the MRC rules anymore. But I assume
that you either have to retain
the values appVersion
and appVer2
from the dictionary,
or alternatively, postpone the [dict release]
until after the values are no longer needed.
Since you don't own the values fetched from the dictionary, they become invalid if the
dictionary is released.
(This would not be a problem if you compile with ARC!)
Remark: The designated method to get a value from a dictionary is objectForKey:
.
valueForKey:
works also in many cases, but can be different. It should only be used
for Key-Value Coding magic.