我在我的項目中使用DSBezelActivityView得到了一個UIWebView,但它似乎有內存泄漏。當頁面加載時,我使用DSBezelActivityView。它的工作原理與內存泄漏一樣。我如何解決這個內存泄漏?內存泄漏DSBezelActivityView
我用這個代碼: http://www.dejal.com/developer/dsactivityview
這就是分析說: 對象泄露:分配對象未在此執行路徑以後引用並具有+1 方法一個保留計數返回一個Objective-C用+1的對象保留計數
- (void)viewDidLoad
{
NSString *urlAddress = [NSString stringWithFormat:@"http://www.google.be"];
//Create a URL object.
NSURL *url = [NSURL URLWithString:urlAddress];
//URL Requst Object
NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
webView.delegate = self;
//Load the request in the UIWebView.
[webView loadRequest:requestObj];
[super viewDidLoad];
}
- (void)webViewDidStartLoad:(UIWebView *)webView {
[DSBezelActivityView newActivityViewForView:aiv withLabel:@"Laden..." width:90];
NSLog(@"werkt dit");
}
- (void)webViewDidFinishLoad:(UIWebView *)webView {
[DSBezelActivityView removeView];
}