これは私の抜粋です:RUN_CLANG_STATIC_ANALYZER
オプション(Property-> [オプション]を構築する>ファイル名を指定して実行静的アナライザ)でこのコードをコンパイルどうすればこのメモリリークを解決できますか?
- (id) initWithFrame:(CGRect)frame andConfig:(PGParams*) params
{
for (int i=0; i<[conf.map count]; i++)
[conf.map replaceObjectAtIndex:i withObject:
[[NSString alloc] initWithFormat:@"%@&sito=%@",
[conf.map objectAtIndex:i], [params sito]]];
for (int i=0; i<[conf.orto count]; i++)
[conf.orto replaceObjectAtIndex:i withObject:
[[NSString alloc] initWithFormat:@"%@&sito=%@",
[conf.orto objectAtIndex:i], [params sito]]];
for (int i=0; i<[conf.mix count]; i++)
[conf.mix replaceObjectAtIndex:i withObject:
[[NSString alloc] initWithFormat:@"%@&sito=%@",
[conf.mix objectAtIndex:i], [params sito]]];
}
、それは私[[NSString alloc] ...
上のリークを示しています。
RUN_CLANG_STATIC_ANALYZER
この設定を有効にすると、Xcodeの予選ソースファイル上のクラン静的解析ツールを実行します。このツールは現在、CおよびObjective-Cファイルをサポートしています。 [RUN_CLANG_STATIC_ANALYZER]
どのように私はそれを解決することができますか?事前に
おかげで、
右!おかげで、今修正されました! – elp