views:

22

answers:

0

Hi,
In my App I have a large memory issue
I add UIScrollview with a viewController views dynamically when I need
and I properly remove the viewController while scrolling.
and in that viewController I placed a UIWebiew in IBOutlet and load webview as

[m_objWebView loadRequest:[NSURLRequest requestWithURL:
                  [NSURL URLWithString:@"http://stackoverflow.com/"]]];

and release UIWebview in viewControllers dealloc

- (void)dealloc {

 m_objWebView.delegate=nil;
 [m_objWebView stopLoading];
 [m_objWebView release];
 m_objWebView=nil;

 [[self.view subviews] makeObjectsPerformSelector:@selector(removeFromSuperview)];

 [super dealloc];
}

but after 5/6 minutes my app crashes after Memory Warning.

help me thanks in advance