在我的應用程序我有一個uiwebview我用來顯示圖像文件。現在的問題是我在這個視圖中泄漏了。這裏我寫了下面的代碼。在uiwebview分配內存泄漏
UIWebView *the_pWebView = [[UIWebView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]]; // the leak is on this line.
the_pWebView.backgroundColor = [UIColor whiteColor];
the_pWebView.scalesPageToFit = YES;
the_pWebView.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight);
the_pWebView.delegate = self;
self.m_pWebView = the_pWebView;
[self.view addSubview: self.m_pWebView];
[the_pWebView release];
有人可以告訴我爲什麼代碼的第一行,我分配的uiwebview將泄漏。即使我已經發布了它?
爲m_pWebView,我已經定義屬性(非原子的,保留),並且已經在dealloc方法中發佈了它。即使這個泄漏正在顯示。 – Jayshree 2010-09-06 09:32:19