mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 09:04:13 +00:00
Set some ivars (delegates which should not be retained) to be gc invisible.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@27591 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
940de12cab
commit
df141e4ab4
8 changed files with 28 additions and 3 deletions
|
@ -143,6 +143,11 @@ static RunLoopEventType typeForStream(NSStream *aStream)
|
|||
|
||||
@implementation GSStream
|
||||
|
||||
+ (void) initialize
|
||||
{
|
||||
class_ivar_set_gcinvisible (self, "delegate", YES);
|
||||
}
|
||||
|
||||
- (void) close
|
||||
{
|
||||
if (_currentStatus == NSStreamStatusNotOpen)
|
||||
|
@ -626,6 +631,7 @@ static RunLoopEventType typeForStream(NSStream *aStream)
|
|||
if (self == [GSInputStream class])
|
||||
{
|
||||
GSObjCAddClassBehavior(self, [GSStream class]);
|
||||
class_ivar_set_gcinvisible (self, "delegate", YES);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -658,6 +664,7 @@ static RunLoopEventType typeForStream(NSStream *aStream)
|
|||
if (self == [GSOutputStream class])
|
||||
{
|
||||
GSObjCAddClassBehavior(self, [GSStream class]);
|
||||
class_ivar_set_gcinvisible (self, "delegate", YES);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -929,6 +936,11 @@ static RunLoopEventType typeForStream(NSStream *aStream)
|
|||
|
||||
@implementation GSServerStream
|
||||
|
||||
+ (void) initialize
|
||||
{
|
||||
class_ivar_set_gcinvisible (self, "delegate", YES);
|
||||
}
|
||||
|
||||
+ (id) serverStreamToAddr: (NSString*)addr port: (int)port
|
||||
{
|
||||
GSServerStream *s;
|
||||
|
|
|
@ -545,6 +545,7 @@ static NSLock *cached_proxies_gate = nil;
|
|||
{
|
||||
NSNotificationCenter *nc;
|
||||
|
||||
class_ivar_set_gcinvisible (self, "delegate", YES);
|
||||
connectionClass = self;
|
||||
dateClass = [NSDate class];
|
||||
distantObjectClass = [NSDistantObject class];
|
||||
|
|
|
@ -464,6 +464,8 @@ static NSDictionary *makeReference(unsigned ref)
|
|||
|
||||
+ (void) initialize
|
||||
{
|
||||
class_ivar_set_gcinvisible (self, "delegate", YES);
|
||||
|
||||
if (globalClassMap == 0)
|
||||
{
|
||||
globalClassMap =
|
||||
|
|
|
@ -274,6 +274,8 @@ static NSMapTable globalClassMap = 0;
|
|||
|
||||
+ (void) initialize
|
||||
{
|
||||
class_ivar_set_gcinvisible (self, "delegate", YES);
|
||||
|
||||
if (globalClassMap == 0)
|
||||
{
|
||||
globalClassMap =
|
||||
|
|
|
@ -81,6 +81,8 @@ static Class NSPort_concrete_class;
|
|||
{
|
||||
NSUserDefaults *defs;
|
||||
|
||||
class_ivar_set_gcinvisible (self, "delegate", YES);
|
||||
|
||||
NSPort_abstract_class = self;
|
||||
NSPort_concrete_class = [NSMessagePort class];
|
||||
|
||||
|
|
|
@ -66,6 +66,12 @@ static NSNull *null = nil;
|
|||
|
||||
@implementation NSXMLSAXHandler
|
||||
|
||||
+ (void) initialize
|
||||
{
|
||||
class_ivar_set_gcinvisible (self, "_delegate", YES);
|
||||
class_ivar_set_gcinvisible (self, "_owner", YES);
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
{
|
||||
DESTROY(_namespaces);
|
||||
|
|
4
configure
vendored
4
configure
vendored
|
@ -3673,8 +3673,8 @@ cat >>confdefs.h <<\_ACEOF
|
|||
_ACEOF
|
||||
|
||||
else
|
||||
{ echo "$as_me:$LINENO: It looks like your libgc is quite old ... please use a newer one to support making the garbage collector aware of new threads." >&5
|
||||
echo "$as_me: It looks like your libgc is quite old ... please use a newer one to support making the garbage collector aware of new threads." >&6;}
|
||||
{ echo "$as_me:$LINENO: It looks like your libgc is quite old ... please consider using a newer one to support making the garbage collector aware of new threads. You can get libgc source from http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc-source/ but NB. the libgc used must be compatible with the version of the objective-c runtime library that you are using." >&5
|
||||
echo "$as_me: It looks like your libgc is quite old ... please consider using a newer one to support making the garbage collector aware of new threads. You can get libgc source from http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc-source/ but NB. the libgc used must be compatible with the version of the objective-c runtime library that you are using." >&6;}
|
||||
fi
|
||||
LIBS="-lobjc_gc -ldl"
|
||||
echo "$as_me:$LINENO: checking for class_ivar_set_gcinvisible" >&5
|
||||
|
|
|
@ -277,7 +277,7 @@ if test $OBJC_WITH_GC = yes; then
|
|||
AC_DEFINE(HAVE_GC_REGISTER_MY_THREAD,1,
|
||||
[Define if GC_register_my_thread function is available])
|
||||
else
|
||||
AC_MSG_NOTICE([It looks like your libgc is quite old ... please use a newer one to support making the garbage collector aware of new threads.])
|
||||
AC_MSG_NOTICE([It looks like your libgc is quite old ... please consider using a newer one to support making the garbage collector aware of new threads. You can get libgc source from http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc-source/ but NB. the libgc used must be compatible with the version of the objective-c runtime library that you are using.])
|
||||
fi
|
||||
LIBS="-lobjc_gc -ldl"
|
||||
AC_CHECK_FUNC(class_ivar_set_gcinvisible, gc_ok=yes, gc_ok=no)
|
||||
|
|
Loading…
Reference in a new issue