diff --git a/ChangeLog b/ChangeLog index ce02a5b08..605079d01 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2011-02-12 Richard Frith-Macdonald + + * Source/GSPrivate.h: + * Source/NSObject.m: + * Source/Additions/NSObject+GNUstepBase.m: + Remove (unused) code for cleanup at program exit. Let's think of a + better way (eg runtime support to call a +atExit method). + 2011-02-11 Richard Frith-Macdonald * Source/NSThread.m: Avoid some unnecessary locking. diff --git a/Source/Additions/NSObject+GNUstepBase.m b/Source/Additions/NSObject+GNUstepBase.m index fd6c884d7..46da2321a 100644 --- a/Source/Additions/NSObject+GNUstepBase.m +++ b/Source/Additions/NSObject+GNUstepBase.m @@ -122,8 +122,3 @@ @end -/* See ../GSPrivate.h for details. - */ -#import "GSPrivate.h" -BaseCacheStruct GSBaseCache = { }; - diff --git a/Source/GSPrivate.h b/Source/GSPrivate.h index f5aaadd57..bfc72a41c 100644 --- a/Source/GSPrivate.h +++ b/Source/GSPrivate.h @@ -543,32 +543,5 @@ GSPrivateIsCollectable(const void *ptr) GS_ATTRIB_PRIVATE; NSZone* GSAtomicMallocZone (void); -/* NB ... this is a placeholder for future cleanups of the code! - * - * GSBaseCache is a structure in which base library classes may cache private - * information expected to be present for the lifetime of the process. - * - * The NSObject class registers the BSBaseCacheCleanup() function to be called - * to clean it up on process termination, but we actually keep the cleanup - * code here so we can easily update it in sync with the structure definition. - * - * This structure is actually implemented in Additions/NSObject+GNUstepBase.m - * so that it can be accessed from the base-additions library as well as the - * base library. - */ -typedef struct { - // Add fields to hold cached values here -} BaseCacheStruct; -BaseCacheStruct GSBaseCache GS_ATTRIB_PRIVATE; - -#if defined(IN_NSOBJECT_M) -static void -GSBaseCacheCleanup(void) -{ - // Add code to clean up cached values here - return; -} -#endif - #endif /* _GSPrivate_h_ */ diff --git a/Source/NSObject.m b/Source/NSObject.m index 321e16322..cded37311 100644 --- a/Source/NSObject.m +++ b/Source/NSObject.m @@ -953,10 +953,6 @@ objc_create_block_classes_as_subclasses_of(Class super) __attribute__((weak)); # endif #endif - /* Cleanup cached information on exit. - */ - atexit(GSBaseCacheCleanup); - #ifdef HAVE_LOCALE_H GSSetLocaleC(LC_ALL, ""); // Set up locale from environment. #endif