diff -r 2068331949ee -r 5cab3034d3a1 CollectionUtils.m --- a/CollectionUtils.m Thu May 14 20:44:32 2009 -0700 +++ b/CollectionUtils.m Wed Sep 02 08:41:25 2009 -0700 @@ -149,19 +149,16 @@ } } - -void setString( NSString **var, NSString *value ) -{ - if( value != *var ) { +void setObjCopy( id *var, id valueToCopy ) { + if( valueToCopy != *var ) { [*var release]; - *var = [value copy]; + *var = [valueToCopy copy]; } } - -BOOL ifSetString( NSString **var, NSString *value ) +BOOL ifSetObjCopy( id *var, id value ) { - if( value != *var && ![value isEqualToString: *var] ) { + if( value != *var && ![value isEqual: *var] ) { [*var release]; *var = [value copy]; return YES;