Leaks when using RaptureXML with XPath

HetTadiaTeant

New Member
I am using RaptureXML to parse an XML file which describes different filters (with a rather complex structure), which I then create as Obj-C objects. All works fine!However, Instruments detects several leaks in libxml2.2.dylib (see screenshot) and I cant find anything online that could help me with this issue.Here is a link to a screenshot of the Leaks Instrument (I cant post it to sof yet...)http://imageshack.us/photo/my-images/850/bildschirmfoto20120507ud.png/Here is the code I'm using to parse the xml file:\[code\]RXMLElement *rootXML = [RXMLElement elementFromXMLData:xmlDataFile];FilterLogic_Management *filterManager = [[FilterLogic_Management alloc] init];NSString *queryPath = [NSString stringWithFormat:@"//%@[@id=%i]/filterSettings/fqFilter", FilterTypeAsString, FilterNum];//WHAT AM I DOING? Consider two filter types: Distance and Price. Each filter type consists of different thresholds (e.g., <8 $; 8 - 15 $; > 15 $). All of these values are in an XML file which I need to parse and translate into my "real" filters that I use in the App.//Step 1: Iterate over all FilterTypes to find the entry in the XML file that describes the currently selected FilterType and its FilterNum[rootXML queryPath usingBlock:^(RXMLElement *filterElement) { NSMutableArray *currentThresholds = [[NSMutableArray alloc] init]; float currentWeight = [filterElement attribute:@"weightFactor"].floatValue; //e.g., 1.0 NSString *currentMarkerUnit = [filterElement attribute:@"markerUnit"]; //e.g., $ or
 
Back
Top