How to solbe this memory leak … I even release it at the end as in the pic but its still there. In if statment almost 10-15 condition its using like the given code… But at the end I release it.

LoginResponse *response = [[LoginResponse alloc] initWithMessageString: messageString];
ServerMessage *ackMessage = [[ServerMessage alloc] initWithMessageToAck:response];
[[NSNotificationCenter defaultCenter] postNotificationName:@"SendMessageToServer" object:ackMessage];
[[NSNotificationCenter defaultCenter] postNotificationName:@"LoginResponseReceived" object:response];
You’re not releasing
messageString. What you’re doing is this:Perform “Analyze” from XCode. (It’s below the “build” menu item.) I think that should capture this problem of forgetting to release the inner
messageString. Use “Analyze” before running Instruments.