With instruments i got a memory leak on this piece of code and i don\'t understand why!
-(void)goToThisUrl:(id) targetUrl
{
NSAutoreleasePool *pool = [[NSAut
There is no leak in the above. There may be one or more leaks in the parts you've deleted and replaced with "someCondition" and "Doing some stuff here," but no one here can help with that unless you post the complete code that you're really testing with Instruments.
Also: "// When releasing data(because data retainCount = 2) ..." Stop. Right. There. Ignore retainCount. You release an object because you've created it using a method that implies ownership, or because you've retained it. You NEVER release an object just because its retainCount has a value you didn't expect or don't understand. Read Apple's Memory Management Programming Guide for details.