diff --git a/ChangeLog b/ChangeLog index 83c0e42b7..698cba0fa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,7 @@ Added support for system-wide .GNUsteprc with force options. Removed use of FORCE_USER_ROOT and FORCE_DEFAULTS_ROOT * Source/Base/gsdoc: Document the .GNUsteprc files. + * Source/NSArray.m: Fix bug with GC pointed out by James Knight 2002-05-09 Richard Frith-Macdonald diff --git a/Source/NSArray.m b/Source/NSArray.m index 527df5b3a..482498d2a 100644 --- a/Source/NSArray.m +++ b/Source/NSArray.m @@ -987,11 +987,17 @@ static NSString *indentStrings[] = { [self getObjects: objects]; for (i = 0; i < count; i++) - objects[i] = [objects[i] copyWithZone: zone]; + { + objects[i] = [objects[i] copyWithZone: zone]; + } newArray = [[GSArrayClass allocWithZone: zone] initWithObjects: objects count: count]; +#if GS_WITH_GC == 0 while (i > 0) - RELEASE(objects[--i]); + { + [objects[--i] release]; + } +#endif return newArray; } @@ -1150,7 +1156,7 @@ static NSString *indentStrings[] = { (*rem)(self, remSel, i); } } -#ifndef GS_WITH_GC +#if GS_WITH_GC == 0 if (rem != 0) { RELEASE(anObject);