Use release' and dealloc' instead of `free'.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@90 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
mccallum 1995-03-12 19:33:56 +00:00
parent b67f617bc3
commit 24310fc684
7 changed files with 13 additions and 13 deletions

View file

@ -137,7 +137,7 @@
- sendBycopy: (bycopy id)o - sendBycopy: (bycopy id)o
{ {
printf(">> bycopy class is %s\n", [o name]); printf(">> bycopy class is %s\n", [o name]);
[o free]; [o release];
return self; return self;
} }
- manyArgs: (int)i1 : (int)i2 : (int)i3 : (int)i4 : (int)i5 : (int)i6 - manyArgs: (int)i1 : (int)i2 : (int)i3 : (int)i4 : (int)i5 : (int)i6
@ -175,7 +175,7 @@
for (j = 0; j < [theList count]; j++) for (j = 0; j < [theList count]; j++)
if ([theList objectAt:j] == [objList objectAtIndex:i]) if ([theList objectAt:j] == [objList objectAtIndex:i])
[theList removeObjectAt:j]; [theList removeObjectAt:j];
[objList free]; [objList release];
if (listCount != [theList count]) if (listCount != [theList count])
printf("$$$$$ senderIsInvalid: removed from theList\n"); printf("$$$$$ senderIsInvalid: removed from theList\n");
} }

View file

@ -30,9 +30,9 @@ int main()
mc = [[MappedCollector alloc] initCollection:dict map:translator]; mc = [[MappedCollector alloc] initCollection:dict map:translator];
[mc printForDebugger]; [mc printForDebugger];
[mc free]; [mc release];
[dict free]; [dict release];
[translator free]; [translator release];
exit(0); exit(0);

View file

@ -39,6 +39,6 @@ int main()
/* cause an error */ /* cause an error */
/* s = [heap elementAtIndex:999].short_int_u; */ /* s = [heap elementAtIndex:999].short_int_u; */
[heap free]; [heap release];
exit(0); exit(0);
} }

View file

@ -17,7 +17,7 @@ int main()
[array makeObjectsPerform:@selector(name)]; [array makeObjectsPerform:@selector(name)];
[[array objectAtIndex:0] hash]; [[array objectAtIndex:0] hash];
[[array freeObjects] free]; [[array releaseObjects] release];
printf("no errors\n"); printf("no errors\n");
exit(0); exit(0);
} }

View file

@ -13,13 +13,13 @@ void test(id objects)
stream = objc_open_typed_stream_for_file("test08.data", OBJC_WRITEONLY); stream = objc_open_typed_stream_for_file("test08.data", OBJC_WRITEONLY);
objc_write_root_object(stream, objects); objc_write_root_object(stream, objects);
objc_close_typed_stream(stream); objc_close_typed_stream(stream);
[objects free]; [objects release];
stream = objc_open_typed_stream_for_file("test08.data", OBJC_READONLY); stream = objc_open_typed_stream_for_file("test08.data", OBJC_READONLY);
objc_read_object(stream, &objects); objc_read_object(stream, &objects);
printf("read "); printf("read ");
[objects printForDebugger]; [objects printForDebugger];
[objects free]; [objects release];
} }
int main() int main()

View file

@ -19,7 +19,7 @@ int main()
for (i = 1; i < 20; i++) for (i = 1; i < 20; i++)
[s addElement:(int)random()%99]; [s addElement:(int)random()%99];
[[s contentsCollector] binaryTreePrintForDebugger]; [[s contentsCollector] binaryTreePrintForDebugger];
[s free]; [s release];
s = [[EltNodeCollector alloc] initWithType:@encode(int) s = [[EltNodeCollector alloc] initWithType:@encode(int)
nodeCollector:[[SplayTree alloc] init] nodeCollector:[[SplayTree alloc] init]
@ -30,7 +30,7 @@ int main()
[s removeElement:[s elementAtIndex:10]]; [s removeElement:[s elementAtIndex:10]];
[[s contentsCollector] binaryTreePrintForDebugger]; [[s contentsCollector] binaryTreePrintForDebugger];
[[s contentsCollector] withObjectsCall:foo]; [[s contentsCollector] withObjectsCall:foo];
[s free]; [s release];
s = [[EltNodeCollector alloc] initWithType:@encode(int) s = [[EltNodeCollector alloc] initWithType:@encode(int)
nodeCollector:[[BinaryTree alloc] init] nodeCollector:[[BinaryTree alloc] init]

View file

@ -20,7 +20,7 @@ int main()
rng = [[RNGBerkeley alloc] init]; rng = [[RNGBerkeley alloc] init];
printf("%s chi^2 = %f\n", printf("%s chi^2 = %f\n",
[rng name], [Random chiSquareOfRandomGenerator:rng]); [rng name], [Random chiSquareOfRandomGenerator:rng]);
[r free]; [r release];
rng = [[RNGAdditiveCongruential alloc] init]; rng = [[RNGAdditiveCongruential alloc] init];
/* /*
@ -29,7 +29,7 @@ int main()
*/ */
printf("%s chi^2 = %f\n", printf("%s chi^2 = %f\n",
[rng name], [Random chiSquareOfRandomGenerator:rng]); [rng name], [Random chiSquareOfRandomGenerator:rng]);
[rng free]; [rng release];
exit(0); exit(0);
} }