I have an, at least to me, strange case here: I have a relatively simple program which loads an XML file from the web, parses it and write the data into an array of dictionaries. Each dictionary represents a row in the table. The program works fine and if I attach my simulator to instruments and load the list, there is no memory leak.
Now here is the strange part: There is a button for the user to reload the list. If you press it, the previous data gets cleared, the XML newly downloaded and parsed and so on. If I press this button, I still can t find a memory leak. Yet if I press it twice, suddenly there are leaks all around. I am very puzzled, how come there are suddenly leaks where there used to be none before (The leaks only appear if the same code is run twice)? It is especially weird as I am using part of Apple s sample XMLParser for instance, my code is a 1:1 copy of theirs, yet when I run the parser twice, instruments reports a leak in this code.
I am glad for any help, I pretty much don t know how to got about this. The code should be fine. I have already tried "Build and Analyze", it does not reveil anything I would not see in instruments either.
All the best, Robin