Do retain/release/autorelease of contents as appropriate.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@136 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
mccallum 1995-03-17 19:34:04 +00:00
parent 264d951458
commit dac4ec0f04
3 changed files with 7 additions and 3 deletions

View file

@ -209,6 +209,7 @@
{
if (coll_hash_value_for_key(_contents_hash, anElement).void_ptr_u == 0)
coll_hash_add(&_contents_hash, anElement, 1);
RETAIN_ELT(anElement);
return self;
}
@ -221,7 +222,7 @@
coll_hash_remove(_contents_hash, oldElement);
else
RETURN_BY_CALLING_EXCEPTION_FUNCTION(excFunc);
return oldElement;
return AUTORELEASE_ELT(oldElement);
}
/* This must work without sending any messages to content objects */