Hey everyone,
I have a bit of code that is leaking and I can't seem to figure out why.
I have an XML Parser, and here's one of the snippets from its didEndElement method:
CurrentAttribute is an NSMutableString that I clear out every time I encounter a new object. tempElement is a custom object that I use to store parsed values.
I use the stringByReplacingOccurencesOfString method to remove spaces from links that I pull from an RSS feed.
Doing this should return an autoreleased object, right?
It seems this bit of code leaks though. Any thoughts?
I have a bit of code that is leaking and I can't seem to figure out why.
I have an XML Parser, and here's one of the snippets from its didEndElement method:
Code:
else if([elementName isEqualToString:@"link"])
{
NSString *link = [currentAttribute stringByReplacingOccurrencesOfString:@" " withString:@"%20"];
[tempElement setLink:link];
}
CurrentAttribute is an NSMutableString that I clear out every time I encounter a new object. tempElement is a custom object that I use to store parsed values.
I use the stringByReplacingOccurencesOfString method to remove spaces from links that I pull from an RSS feed.
Doing this should return an autoreleased object, right?
It seems this bit of code leaks though. Any thoughts?