any difference between these two dealloc methods?

dealloc, memory-management, objective-c

Solution

They're both wrong. `dealloc` returns `void`, not `id`:

- (void) dealloc {
  [rect release];
  [super dealloc];
}

Problem

So i'm overriding dealloc method because the object is a composite object made up of one other object. I originally had this dealloc method: ``` -(id) dealloc; // Override to release the Rectangle object’s memory { [rect release]; [super dealloc]; return self; } ``` After looking in the book I saw another answer: ``` { [rect release]; return [super dealloc]; } ``` just wondering if both work equally. Thanks, Nick

Original source