开发者

leak at status parser method in libxml

开发者 https://www.devze.com 2023-01-17 05:41 出处:网络
I had a problem with the LibXMLParser when I开发者_JAVA技巧 ran it in the instruments. the following is my code that I used.

I had a problem with the LibXMLParser when I开发者_JAVA技巧 ran it in the instruments. the following is my code that I used.

- (id)statusParser
{
    return [[[self class] alloc] init];
}

The memory is leaking at return method.


Did you try autorelease?

 - (id)statusParser
{
    return [[[[self class] alloc] init] autorelease];
}
0

精彩评论

暂无评论...
验证码 换一张
取 消