Assert the validity of all your method parameters. While it can help to assert return results thats less helpful as most return results are later used as input parameters:
#import <assert.h> - (void) foo( int *p, int n ) { assert( NULL != p && n > 0 && n < 10 ); ... return; } This might not have found the crash we're discussing but it will find many others by the time you ship. Also assertions are more effective than comments for documenting APIs because one is forced to maintain them along with the rest of the code. - Mike -- Michael David Crawford P.E., Consulting Process Architect mdcrawf...@gmail.com http://mike.soggywizard.com/ One Must Not Trifle With Wizards For It Makes Us Soggy And Hard To Light. _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com