Is this good or bad practice?
if (!theConnection && !receivedData) {
// release the connection, and the data object
[theConnection release];
// receivedData is declared as a method instance elsewhere
[receivedData release];
}
Sending any message to nil object has no effect, so you can safely remove that check.
Moreover your code leaks memory in case only 1 of the object is non-nil.