*** empty log message ***

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@24 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Andrew McCallum 1994-11-08 20:12:12 +00:00
parent fad2772eab
commit 22f0c52cfd
8 changed files with 23 additions and 18 deletions

View file

@ -169,9 +169,9 @@ It is known not to work with:
@section Now and Future
The current version is 0.1; the low number indicates that the library is
still in flux. A version coming soon will include String objects and
better allocation/dealocation conventions.
The current version is @value{OBJECTS_VERSION} the low number indicates
that the library is still in flux. A version coming soon will include
String objects and better allocation/dealocation conventions.
@section GNUStep, NEXTSTEP and OpenStep

View file

@ -88,7 +88,12 @@
Due to this delayed release, the function that receives the object
as a return value will have the opportunity to retain the object
before the "release" instigated by the "autorelease" actually
takes place. */
takes place.
For the object to be autoreleased, you must have previously created
a AutoreleasePool or an AutoreleaseStack. If you don't, however,
your program won't crash, the release corresponding to the
autorelease will just never happen. */
@end

View file

@ -1,8 +1,8 @@
#include <objects/stdobjects.h>
#include <foundation/NSObject.h>
#include <foundation/NSMethodSignature.h>
#include <foundation/NSArchiver.h>
#include <foundation/NSCoder.h>
#include "objc/objc-api.h"
@implementation NSObject

View file

@ -25,6 +25,7 @@
#include <objects/collhash.h>
#include <objects/eltfuncs.h>
#include <objects/objc-malloc.h>
#include <objects/AutoreleasePool.h>
#include <limits.h>
/* Doesn't handle multi-threaded stuff.
@ -34,7 +35,7 @@
static coll_cache_ptr retain_counts = NULL;
/* The Class responsible for handling autorelease's */
static id autorelease_class = nil;
id autorelease_class = nil;
static void
init_retain_counts_if_necessary()
@ -94,12 +95,6 @@ objc_retain_count (id anObj)
return 0;
}
void
objc_set_autorelease_class (id the_autorelease_class)
{
auto_release_class = the_autorelease_class;
}
@implementation Object (RetainingObject)
- retain
@ -125,8 +120,8 @@ objc_set_autorelease_class (id the_autorelease_class)
- autorelease
{
[the_autorelease_class addObject:self];
returnself;
[autorelease_class autoreleaseObject:self];
return self;
}
@end

View file

@ -345,7 +345,7 @@ static inline BOOL class_is_kind_of(CLASS self, CLASS aClassObject)
- autorelease
{
/* xxx Problems here if the Connection goes away? */
[autorelease_class addObject:self];
[autorelease_class autoreleaseObject:self];
return self;
}

View file

@ -88,7 +88,12 @@
Due to this delayed release, the function that receives the object
as a return value will have the opportunity to retain the object
before the "release" instigated by the "autorelease" actually
takes place. */
takes place.
For the object to be autoreleased, you must have previously created
a AutoreleasePool or an AutoreleaseStack. If you don't, however,
your program won't crash, the release corresponding to the
autorelease will just never happen. */
@end

View file

@ -1,4 +1,4 @@
/* Support for general purpose definitions for the Collection Library.
/* Support for general purpose definitions for libobjects.
Copyright (C) 1993,1994 Free Software Foundation, Inc.
Written by: R. Andrew McCallum <mccallum@gnu.ai.mit.edu>

View file

@ -1,4 +1,4 @@
/* Support for general purpose definitions for the Collection Library.
/* Support for general purpose definitions for libobjects.
Copyright (C) 1993,1994 Free Software Foundation, Inc.
Written by: R. Andrew McCallum <mccallum@gnu.ai.mit.edu>