mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 00:11:26 +00:00
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:
parent
264d951458
commit
dac4ec0f04
3 changed files with 7 additions and 3 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue