What is using up so much memory here?
What is using up so much memory here?
- Subject: What is using up so much memory here?
- From: James Cicenia <email@hidden>
- Date: Tue, 10 Mar 2009 18:26:49 -0500
Ok -
Here is the offending code that sucks up about 2MB:
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
while(thisState = [statesEnum nextObject]){
UIImageView *singleStateView = [[[UIImageView
alloc]initWithFrame:CGRectMake(2,0, 293, 184)]autorelease];
[singleStateView setImage: [UIImage imageNamed:[[@"wf-map-gray-"
stringByAppendingString:thisState
]stringByAppendingString:@"_glow.png"]]];
[singleStateView setTag:100];
[fruitStateView addSubview:singleStateView];
}
[pool release];
These are little pngs of the states. They are tiny 4KB images
yet when this loop runs it winds up taking up an additional 2MB
Thanks
James Ciceni
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden