2011-01-12 10 views
0
htmPath = [[NSBundle mainBundle] pathForResource:@"barcode" ofType:@"html"]; 
params = [[NSString alloc] initWithFormat:@"?data=%@",numberTextField.text]; 
fileURL = [NSURL URLWithString:[[[NSURL fileURLWithPath:htmPath] absoluteString] stringByAppendingString:params]]; 

[self.barView loadRequest:[NSURLRequest requestWithURL:fileURL]]; 

//// htmpath、paramsは文字列です。メモリがこのコードをリークします

/// fileurlはnsurlであり、この場合、結果として2つの文字列を追加して呼び出します。 ///numberTextField.textは、このhtmlをさらに機能させるためのテキストフィールドです。

答えて

4

あなたは "params"を割り当てており、それをリリースしていません。

params = [[NSString alloc] initWithFormat:@"?data=%@",numberTextField.text]; 

割り当てられたすべてのオブジェクトを解放する必要があります。

[params release]; 
+0

私はそのボスをリリースしました – pradeep

関連する問題