mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 16:50:58 +00:00
Add methods from 10.8 for using zeroing weak references in collections.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@35877 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
66364a9465
commit
69d4344a0a
8 changed files with 110 additions and 10 deletions
|
@ -52,7 +52,9 @@ enum {
|
|||
NSHashTableCopyIn
|
||||
= NSPointerFunctionsCopyIn,
|
||||
NSHashTableObjectPointerPersonality
|
||||
= NSPointerFunctionsObjectPointerPersonality
|
||||
= NSPointerFunctionsObjectPointerPersonality,
|
||||
NSHashTableWeakMemory
|
||||
= NSPointerFunctionsWeakMemory
|
||||
};
|
||||
|
||||
typedef NSUInteger NSHashTableOptions;
|
||||
|
@ -62,6 +64,14 @@ typedef NSUInteger NSHashTableOptions;
|
|||
+ (id) hashTableWithOptions: (NSPointerFunctionsOptions)options;
|
||||
|
||||
+ (id) 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
|
||||
* their last other reference disappears.
|
||||
*/
|
||||
+ (id) weakObjectsHashTable;
|
||||
|
||||
|
||||
- (id) initWithOptions: (NSPointerFunctionsOptions)options
|
||||
capacity: (NSUInteger)initialCapacity;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue