shannoga
shannoga

Reputation: 19869

Leak on const char *

I have a leak from this code, but it is suppose to be autoreleased ? Can any one explain why is it leaking ?

-(NSString*)tagName
{
    return @((const char*)_node->name);
}

EDIT enter image description here

Thanks Shani

Upvotes: 0

Views: 152

Answers (1)

Nikolai Ruhe
Nikolai Ruhe

Reputation: 81868

The only way the posted code could leak is when there's no autorelease pool in place. You would see a console message if that would be the case.

If you want further help please provide more information about the leak, like an instruments screenshot or more information about how you are detecting the leak.

Upvotes: 1

Related Questions