mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 08:41:03 +00:00
(autoreleaseObject): Renamed from addObject.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@23 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
dc17fc89ce
commit
aa33e29a63
2 changed files with 43 additions and 9 deletions
|
@ -21,7 +21,7 @@
|
|||
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#include <objects/stdobject.h>
|
||||
#include <objects/stdobjects.h>
|
||||
#include <objects/AutoreleasePool.h>
|
||||
#include <objects/collhash.h>
|
||||
#include <objects/eltfuncs.h>
|
||||
|
@ -46,7 +46,7 @@ static AutoreleasePool *current_pool = nil;
|
|||
+ initialize
|
||||
{
|
||||
if (self == [AutoreleasePool class])
|
||||
objc_set_autorelease_class(self);
|
||||
autorelease_class = self;
|
||||
return self;
|
||||
}
|
||||
|
||||
|
@ -55,12 +55,12 @@ static AutoreleasePool *current_pool = nil;
|
|||
return current_pool;
|
||||
}
|
||||
|
||||
+ (void) addObject: anObj
|
||||
+ (void) autoreleaseObject: anObj
|
||||
{
|
||||
[current_pool addObject:anObj];
|
||||
[current_pool autoreleaseObject:anObj];
|
||||
}
|
||||
|
||||
- (void) addObject: anObj
|
||||
- (void) autoreleaseObject: anObj
|
||||
{
|
||||
released_count++;
|
||||
if (released_count == released_size)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue