Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

testgame

macrumors newbie
Original poster
Jun 9, 2010
21
0
Hello,

I have memory problem in my application. I am integrating some application in one application.

Following is my problem:
-I have one UIView named MainView.
At this time memory usage is 9.0 mb.

-now i am adding another view on it.
Memory usage increase to 13-15 mb.

- When i release that newly added view from superview. [self removefromsuperview];
Memory is 9.5 mb. it's not 9.0 mb.

- As i open more views memory increases.

I release all the objects & controls i take in that view.

Pls help me to solve this problem.

Thanks in Advance.
 
Are you release it

release that newly added view ,not just [self removefromsuperview],also [newly_added_view release];Are you release it?
 
release that newly added view ,not just [self removefromsuperview],also [newly_added_view release];Are you release it?

Thanks for your reply.

I have one mainView. It contains button 1 to 5.

When I click on button 1, I write following code.

view1 *view = [[view1 alloc] initWithFrame:[UIScreen mainScreen].applicationFrame];
[self.superview addSubview:view];
[view release];

& in view1 i write [self removeFromSuperView]; To go back to mainView.
I release all the objects i took in view1.

At this time memory problem occurs. As I click on more buttons & add more views memory increases even i m removing it.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.