From fca9bcfe2f6c66535b526d0ba3a40ad586a447f5 Mon Sep 17 00:00:00 2001 From: Andrew McCallum Date: Fri, 29 Mar 1996 17:51:07 +0000 Subject: [PATCH] ([ConstantCollection -_collectionReleaseContents]): Use alloca() instead of malloc() and free(). git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1288 72102866-910b-0410-8b05-ffd578937521 --- Source/Collection.m | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Source/Collection.m b/Source/Collection.m index 839b390d5..4404b8f5f 100644 --- a/Source/Collection.m +++ b/Source/Collection.m @@ -671,7 +671,7 @@ - (void) _collectionReleaseContents { int c = [self count]; - id *array = (id*) (*objc_malloc) (c * sizeof(id)); + id *array = (id*) alloca (c * sizeof(id)); int i = 0; void *es = [self newEnumState]; id o; @@ -683,7 +683,6 @@ assert (c == i); for (i = 0; i < c; i++) [array[i] release]; - (*objc_free) (array); } - (void) _collectionDealloc