mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 00:30:53 +00:00
*** 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:
parent
aa33e29a63
commit
ff9b9b68a1
8 changed files with 23 additions and 18 deletions
|
@ -169,9 +169,9 @@ It is known not to work with:
|
||||||
|
|
||||||
@section Now and Future
|
@section Now and Future
|
||||||
|
|
||||||
The current version is 0.1; the low number indicates that the library is
|
The current version is @value{OBJECTS_VERSION} the low number indicates
|
||||||
still in flux. A version coming soon will include String objects and
|
that the library is still in flux. A version coming soon will include
|
||||||
better allocation/dealocation conventions.
|
String objects and better allocation/dealocation conventions.
|
||||||
|
|
||||||
@section GNUStep, NEXTSTEP and OpenStep
|
@section GNUStep, NEXTSTEP and OpenStep
|
||||||
|
|
||||||
|
|
|
@ -88,7 +88,12 @@
|
||||||
Due to this delayed release, the function that receives the object
|
Due to this delayed release, the function that receives the object
|
||||||
as a return value will have the opportunity to retain the object
|
as a return value will have the opportunity to retain the object
|
||||||
before the "release" instigated by the "autorelease" actually
|
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
|
@end
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
|
#include <objects/stdobjects.h>
|
||||||
#include <foundation/NSObject.h>
|
#include <foundation/NSObject.h>
|
||||||
#include <foundation/NSMethodSignature.h>
|
#include <foundation/NSMethodSignature.h>
|
||||||
#include <foundation/NSArchiver.h>
|
#include <foundation/NSArchiver.h>
|
||||||
#include <foundation/NSCoder.h>
|
#include <foundation/NSCoder.h>
|
||||||
#include "objc/objc-api.h"
|
|
||||||
|
|
||||||
@implementation NSObject
|
@implementation NSObject
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
#include <objects/collhash.h>
|
#include <objects/collhash.h>
|
||||||
#include <objects/eltfuncs.h>
|
#include <objects/eltfuncs.h>
|
||||||
#include <objects/objc-malloc.h>
|
#include <objects/objc-malloc.h>
|
||||||
|
#include <objects/AutoreleasePool.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
|
||||||
/* Doesn't handle multi-threaded stuff.
|
/* Doesn't handle multi-threaded stuff.
|
||||||
|
@ -34,7 +35,7 @@
|
||||||
static coll_cache_ptr retain_counts = NULL;
|
static coll_cache_ptr retain_counts = NULL;
|
||||||
|
|
||||||
/* The Class responsible for handling autorelease's */
|
/* The Class responsible for handling autorelease's */
|
||||||
static id autorelease_class = nil;
|
id autorelease_class = nil;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
init_retain_counts_if_necessary()
|
init_retain_counts_if_necessary()
|
||||||
|
@ -94,12 +95,6 @@ objc_retain_count (id anObj)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
objc_set_autorelease_class (id the_autorelease_class)
|
|
||||||
{
|
|
||||||
auto_release_class = the_autorelease_class;
|
|
||||||
}
|
|
||||||
|
|
||||||
@implementation Object (RetainingObject)
|
@implementation Object (RetainingObject)
|
||||||
|
|
||||||
- retain
|
- retain
|
||||||
|
@ -125,8 +120,8 @@ objc_set_autorelease_class (id the_autorelease_class)
|
||||||
|
|
||||||
- autorelease
|
- autorelease
|
||||||
{
|
{
|
||||||
[the_autorelease_class addObject:self];
|
[autorelease_class autoreleaseObject:self];
|
||||||
returnself;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -345,7 +345,7 @@ static inline BOOL class_is_kind_of(CLASS self, CLASS aClassObject)
|
||||||
- autorelease
|
- autorelease
|
||||||
{
|
{
|
||||||
/* xxx Problems here if the Connection goes away? */
|
/* xxx Problems here if the Connection goes away? */
|
||||||
[autorelease_class addObject:self];
|
[autorelease_class autoreleaseObject:self];
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -88,7 +88,12 @@
|
||||||
Due to this delayed release, the function that receives the object
|
Due to this delayed release, the function that receives the object
|
||||||
as a return value will have the opportunity to retain the object
|
as a return value will have the opportunity to retain the object
|
||||||
before the "release" instigated by the "autorelease" actually
|
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
|
@end
|
||||||
|
|
||||||
|
|
|
@ -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.
|
Copyright (C) 1993,1994 Free Software Foundation, Inc.
|
||||||
|
|
||||||
Written by: R. Andrew McCallum <mccallum@gnu.ai.mit.edu>
|
Written by: R. Andrew McCallum <mccallum@gnu.ai.mit.edu>
|
||||||
|
|
|
@ -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.
|
Copyright (C) 1993,1994 Free Software Foundation, Inc.
|
||||||
|
|
||||||
Written by: R. Andrew McCallum <mccallum@gnu.ai.mit.edu>
|
Written by: R. Andrew McCallum <mccallum@gnu.ai.mit.edu>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue