I have a NSURLConnectionDelegate object handling some SOAP communications. Essentially I'm setting a few property values, and then calling a method that builds an xml request and then sends it to the server. The object is also a NSXMLParserDelegate so it can parse the xml responses from the server and process the data appropriately.
When using the object I first set values for a number of properties. The retain count after is still one. I then call my first method and that is when the fun begins. Any time a custom method, or a NSURLConnectionDelegate method is called the retain count increases by 1. When NSXMLParserDelegate methods are called this doesn't happen. After all communications are finished and I'm done with the objects it's retain count it 43. Releasing the object does not decrease the retain count, so I end up with an object that I can't free. Besides that the object works as expected.
There is a lot of code and I'm not really sure what's relevant since it doesn't actually seem like anything I'm doing inside the methods is causing the retainCount to increment. The only other thing worth mentioning is that I'm calling these methods from a background thread but performing them on the main thread:
[tEditor performSelectorOnMainThread:@selector(requestQueueList) withObject:nil waitUntilDone:YES];