Presumably meant for the list. Victor's ( Eugen ? ) question follows:

How can I release from memory an instance variable using Objective C ARC.
My ivar is NSMutableArray and is filled dinamicaly with NSDictionary items.

After instanciating the variable [NSMutableArray array].
Fill [mymutarr addObject:@{@“key”:@“val”… etc}]
At the end of “applicationDidFinishLaunching” function i do:
[mymutarr removeAllObjects];
mymutarr = nil;
But in “Activity Monitor” my application will use the maximum value memory allocated.
I want to release it from memory forever.

@interface AppDelegate ()
NSMutableArray *mymutarr;

@implementation AppDelegate
- (void)applicationDidFinishLaunching:(NSNotification *)notification
self->mymutarr = [NSMUtableArray array];
for (int i=0; i<150000; i++) {
[self->mymutarr addObject:@{@“test”:@“a very long string”}];
[self->nsmutarr removeAllObjects];
self->nsmutarr = nil;

Victor Rosu

To unsubscribe, send ANY message to: futurebasic-unsubscribe@... To access the list archives, go to: