mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-10 16:20:42 +00:00
Final batch of GC cleanups (for the forseeable future).
This commit is contained in:
parent
b49af95359
commit
28a6e6ebbd
7 changed files with 61 additions and 43 deletions
37
ChangeLog
37
ChangeLog
|
@ -1,3 +1,40 @@
|
|||
2024-07-25 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Headers/Foundation/NSHashTable.h:
|
||||
* Headers/Foundation/NSMapTable.h:
|
||||
* Headers/Foundation/NSPointerArray.h:
|
||||
* Headers/Foundation/NSPointerFunctions.h:
|
||||
* Headers/Foundation/NSZone.h:
|
||||
* Headers/GNUstepBase/config.h.in:
|
||||
* Source/GSSocketStream.m:
|
||||
* Source/GSStream.m:
|
||||
* Source/NSConcreteHashTable.m:
|
||||
* Source/NSConcreteMapTable.m:
|
||||
* Source/NSConcretePointerFunctions.h:
|
||||
* Source/NSConcretePointerFunctions.m:
|
||||
* Source/NSConnection.m:
|
||||
* Source/NSHashTable.m:
|
||||
* Source/NSKeyedArchiver.m:
|
||||
* Source/NSKeyedUnarchiver.m:
|
||||
* Source/NSKeyValueObserving.m:
|
||||
* Source/NSMapTable.m:
|
||||
* Source/NSPointerArray.m:
|
||||
* Source/NSPort.m:
|
||||
* Source/NSZone.m:
|
||||
* Tests/base/NSHashTable/create.m:
|
||||
* Tests/base/NSHashTable/weakObjects.m:
|
||||
* Tests/base/NSIndexSet/enumerateRanges.m:
|
||||
* Tests/base/NSMapTable/create.m:
|
||||
* Tests/base/NSMapTable/weakObjects.m:
|
||||
* Tests/base/NSPointerArray/weakObjects.m:
|
||||
* Tests/base/NSPointerFunctions/basic.m:
|
||||
* Tests/base/NSPointerFunctions/general.m:
|
||||
* Tests/base/NSPointerFunctions/TestInfo:
|
||||
General fixups for pointer functions, removing obsolete (non-working)
|
||||
GC related internal code. There is probably still a little of that old
|
||||
stuff lurking in the internals which should be removed when found, but
|
||||
the vast majority is cleaned up.
|
||||
|
||||
2024-07-15 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Headers/Foundation/NSPointerFunctions.h: deprecate GC methods.
|
||||
|
|
|
@ -66,16 +66,12 @@ GS_EXPORT_CLASS
|
|||
|
||||
+ (instancetype) hashTableWithOptions: (NSPointerFunctionsOptions)options;
|
||||
|
||||
+ (instancetype) hashTableWithWeakObjects;
|
||||
/**
|
||||
* Creates a hash table that uses zeroing weak references (either using the
|
||||
* automatic reference counting or garbage collection mechanism, depending on
|
||||
* which mode this framework is compiled in) so that objects are removed when
|
||||
/** Creates a hash table that uses weak references (using the automatic
|
||||
* reference counting mechanism) so that objects are removed when
|
||||
* their last other reference disappears.
|
||||
*/
|
||||
+ (instancetype) weakObjectsHashTable;
|
||||
|
||||
|
||||
- (instancetype) initWithOptions: (NSPointerFunctionsOptions)options
|
||||
capacity: (NSUInteger)initialCapacity;
|
||||
|
||||
|
|
|
@ -68,26 +68,6 @@ GS_EXPORT_CLASS
|
|||
+ (instancetype) mapTableWithKeyOptions: (NSPointerFunctionsOptions)keyOptions
|
||||
valueOptions: (NSPointerFunctionsOptions)valueOptions;
|
||||
|
||||
/** Convenience method for creating a map table to store object values
|
||||
* using object keys.
|
||||
*/
|
||||
+ (instancetype) mapTableWithStrongToStrongObjects;
|
||||
|
||||
/** Convenience method for creating a map table to store non-retained
|
||||
* object values with retained object keys.
|
||||
*/
|
||||
+ (instancetype) mapTableWithStrongToWeakObjects;
|
||||
|
||||
/** Convenience method for creating a map table to store retained
|
||||
* object values with non-retained object keys.
|
||||
*/
|
||||
+ (instancetype) mapTableWithWeakToStrongObjects;
|
||||
|
||||
/** Convenience method for creating a map table to store non-retained
|
||||
* object values with non-retained object keys.
|
||||
*/
|
||||
+ (instancetype) mapTableWithWeakToWeakObjects;
|
||||
|
||||
/** Convenience method for creating a map table to store object values
|
||||
* using object keys. The collection will retain both the key and the value.
|
||||
*/
|
||||
|
|
|
@ -59,7 +59,7 @@ GS_EXPORT_CLASS
|
|||
* objects.
|
||||
*/
|
||||
+ (id) strongObjectsPointerArray;
|
||||
/** Returns a new pointer array for storing zeroing weak references to objects.
|
||||
/** Returns a new pointer array for storing weak references to objects.
|
||||
*/
|
||||
+ (id) weakObjectsPointerArray;
|
||||
|
||||
|
|
|
@ -72,8 +72,9 @@ static Class concreteClass = 0;
|
|||
|
||||
+ (id) hashTableWithWeakObjects
|
||||
{
|
||||
return [self hashTableWithOptions:
|
||||
NSPointerFunctionsObjectPersonality | NSPointerFunctionsWeakMemory];
|
||||
GSOnceMLog(@"Garbage Collection no longer supported."
|
||||
@" Using +weakObjectsHashTable");
|
||||
return [self weakObjectsHashTable];
|
||||
}
|
||||
|
||||
+ (id) weakObjectsHashTable
|
||||
|
|
|
@ -72,30 +72,30 @@ static Class concreteClass = 0;
|
|||
|
||||
+ (id) mapTableWithStrongToStrongObjects
|
||||
{
|
||||
return [self mapTableWithKeyOptions: NSPointerFunctionsObjectPersonality
|
||||
valueOptions: NSPointerFunctionsObjectPersonality];
|
||||
GSOnceMLog(@"Garbage Collection no longer supported."
|
||||
@" Using +strongToStrongObjectsMapTable");
|
||||
return [self strongToStrongObjectsMapTable];
|
||||
}
|
||||
|
||||
+ (id) mapTableWithStrongToWeakObjects
|
||||
{
|
||||
return [self mapTableWithKeyOptions: NSPointerFunctionsObjectPersonality
|
||||
valueOptions: NSPointerFunctionsObjectPersonality
|
||||
| NSPointerFunctionsWeakMemory];
|
||||
GSOnceMLog(@"Garbage Collection no longer supported."
|
||||
@" Using +strongToWeakObjectsMapTable");
|
||||
return [self strongToWeakObjectsMapTable];
|
||||
}
|
||||
|
||||
+ (id) mapTableWithWeakToStrongObjects
|
||||
{
|
||||
return [self mapTableWithKeyOptions: NSPointerFunctionsObjectPersonality
|
||||
| NSPointerFunctionsWeakMemory
|
||||
valueOptions: NSPointerFunctionsObjectPersonality];
|
||||
GSOnceMLog(@"Garbage Collection no longer supported."
|
||||
@" Using +weakToStringObjectsMapTable");
|
||||
return [self weakToStringObjectsMapTable];
|
||||
}
|
||||
|
||||
+ (id) mapTableWithWeakToWeakObjects
|
||||
{
|
||||
return [self mapTableWithKeyOptions: NSPointerFunctionsObjectPersonality
|
||||
| NSPointerFunctionsWeakMemory
|
||||
valueOptions: NSPointerFunctionsObjectPersonality
|
||||
| NSPointerFunctionsWeakMemory];
|
||||
GSOnceMLog(@"Garbage Collection no longer supported."
|
||||
@" Using +weakToWeakObjectsMapTable");
|
||||
return [self weakToWeakObjectsMapTable];
|
||||
}
|
||||
|
||||
+ (id) strongToStrongObjectsMapTable
|
||||
|
|
|
@ -204,12 +204,16 @@ static Class concreteClass = Nil;
|
|||
|
||||
+ (id) pointerArrayWithStrongObjects
|
||||
{
|
||||
return [self pointerArrayWithOptions: NSPointerFunctionsStrongMemory];
|
||||
GSOnceMLog(@"Garbage Collection no longer supported."
|
||||
@" Using +strongObjectsPointerArray");
|
||||
return [self strongObjectsPointerArray];
|
||||
}
|
||||
|
||||
+ (id) pointerArrayWithWeakObjects
|
||||
{
|
||||
return [self pointerArrayWithOptions: NSPointerFunctionsWeakMemory];
|
||||
GSOnceMLog(@"Garbage Collection no longer supported."
|
||||
@" Using +weakObjectsPointerArray");
|
||||
return [self weakObjectsPointerArray];
|
||||
}
|
||||
|
||||
- (NSArray*) allObjects
|
||||
|
|
Loading…
Reference in a new issue