Use -autorelease rather than -release when returning objects from a FIFO.

Fixes a bug where a returned reference would already be invalid because
the FIFO was the last owner of the object


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/performance/trunk@38462 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Niels Grewe 2015-04-28 13:28:01 +00:00
parent c110b9139e
commit 80276abfa1
2 changed files with 7 additions and 1 deletions

View file

@ -1,3 +1,9 @@
2015-04-28 Niels Grewe <niels.grewe@halbordnung.de>
* GSFIFO.m: Use -autorelease rather than -release when returning
objects from a FIFO. Fixes a bug where a returned reference would
already be invalid because the FIFO was the last owner of the object.
2015-01-09 Richard Frith-Macdonald <rfm@gnu.org>
* GSFIFO.[hm]: add methods for working with objects and handling

View file

@ -406,7 +406,7 @@ stats(NSTimeInterval ti, uint32_t max, NSTimeInterval *bounds, uint64_t *bands)
index = result = [self get: (void**)buf count: count shouldBlock: block];
while (index-- > 0)
{
[buf[index] release];
[buf[index] autorelease];
}
return result;
}