Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Aug 18, 2010, 08:38 AM   #1
testgame
macrumors newbie
 
Join Date: Jun 2010
Memory Problem

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.
testgame is offline   0 Reply With Quote
Old Aug 18, 2010, 09:13 AM   #2
robbieduncan
Moderator
 
robbieduncan's Avatar
 
Join Date: Jul 2002
Location: London
Without the code it is impossible to help: you are most likely allocating memory and not releasing it.
robbieduncan is offline   0 Reply With Quote
Old Aug 18, 2010, 10:21 PM   #3
sherry2009
macrumors newbie
 
Join Date: Dec 2009
Send a message via ICQ to sherry2009 Send a message via MSN to sherry2009 Send a message via Skype™ to sherry2009
Are you release it

release that newly added view ,not just [self removefromsuperview],also [newly_added_view release];Are you release it?
sherry2009 is offline   0 Reply With Quote
Old Aug 19, 2010, 01:06 AM   #4
testgame
Thread Starter
macrumors newbie
 
Join Date: Jun 2010
Quote:
Originally Posted by sherry2009 View Post
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.
testgame is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Memory problem of iphone 5 duchongbui iPhone 2 Mar 24, 2014 03:09 PM
memory problem. larswik iPhone/iPad Programming 1 Feb 11, 2014 08:25 PM
Mini memory problem scottyd1119 Mac mini 12 Dec 10, 2012 05:45 PM
Really Weird Memory Problem Entre Mac OS X 10.7 Lion 3 Nov 9, 2012 01:48 AM
Memory problem on my iMac Kgisofftheheezy iMac 5 Jul 30, 2012 12:36 PM

Forum Jump

All times are GMT -5. The time now is 10:57 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC