Hi
If I call an instance variable (set with @property) from another object, does that entire variable get reloaded into memory?
For example, I allocate an object at the start of my code, and part of the initialisation loads a large NSDictionary into memory.
EXSomeObject *someObject = [[EXSomeObject alloc] init];
If I later try and access a key from this dictionary from outside EXSomeObject itself, does the whole dictionary get reloaded elsewhere?
Eg NSLog(@"%@",[[someObject someDictionary] objectForKey"someKey"]);
Even if it doesn't, it this considered bad practice for some reason or other?
Many thanks!
If I call an instance variable (set with @property) from another object, does that entire variable get reloaded into memory?
For example, I allocate an object at the start of my code, and part of the initialisation loads a large NSDictionary into memory.
EXSomeObject *someObject = [[EXSomeObject alloc] init];
If I later try and access a key from this dictionary from outside EXSomeObject itself, does the whole dictionary get reloaded elsewhere?
Eg NSLog(@"%@",[[someObject someDictionary] objectForKey"someKey"]);
Even if it doesn't, it this considered bad practice for some reason or other?
Many thanks!
Last edited: