You're right - I'm probably better off using object composition instead of subclassing. Right now, the only method I'm overriding is setUsesFontPanel:. But what exactly are the disadvantages of subclassing?
About dealloc: sure, all my classes have a dealloc: method. But it is beyond me why so many objects aren't released (and thus dealloced if the retain count is zero) when they aren't needed anymore. Take my document class, a concrete subclass of NSDocument, for example: when I close a document, I obviously don't need it anymore. However, it is not released, and all the documents that were previously open increase the memory footprint. Or take the terminate: method in NSApplication: obviously, when the application exits, all its memory is freed anyway. But wouldn't it be a lot more elegant if at least the remaining document instances and the application controller instance were released?
I'm probably on the wrong track here as I'm quite new to Cocoa. Are Cocoa programmers expected to write their own close and terminate methods?
Thanks,
Alex