diff -r 2068331949ee -r d52f6b0d94be CollectionUtils.m --- a/CollectionUtils.m Thu May 14 20:44:32 2009 -0700 +++ b/CollectionUtils.m Wed Jul 01 14:04:56 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;