mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-29 16:01:38 +00:00
([Collection -empty]): Check if already empty. This avoids a previous
malloc(0). git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@591 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
394a4a3424
commit
14b4933dbd
1 changed files with 2 additions and 0 deletions
|
@ -97,6 +97,8 @@ send_release(elt e)
|
|||
/* May be inefficient. Could be overridden; */
|
||||
- empty
|
||||
{
|
||||
if ([self isEmpty])
|
||||
return self;
|
||||
if (CONTAINS_OBJECTS)
|
||||
[self _safeWithElementsCallNoRetain:send_release];
|
||||
[self _empty];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue