mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +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
0fd06dc66f
commit
38c34ba6ea
8 changed files with 110 additions and 10 deletions
|
@ -98,6 +98,31 @@ static Class concreteClass = 0;
|
|||
valueOptions: NSPointerFunctionsObjectPersonality
|
||||
| NSPointerFunctionsZeroingWeakMemory];
|
||||
}
|
||||
+ (id) strongToStrongObjectsMapTable
|
||||
{
|
||||
return [self mapTableWithKeyOptions: NSMapTableObjectPointerPersonality
|
||||
valueOptions: NSMapTableObjectPointerPersonality];
|
||||
}
|
||||
+ (id) strongToWeakObjectsMapTable
|
||||
{
|
||||
return [self mapTableWithKeyOptions: NSMapTableObjectPointerPersonality
|
||||
valueOptions: NSMapTableObjectPointerPersonality |
|
||||
NSMapTableWeakMemory];
|
||||
}
|
||||
+ (id) weakToStrongObjectsMapTable
|
||||
{
|
||||
return [self mapTableWithKeyOptions: NSMapTableObjectPointerPersonality |
|
||||
NSMapTableWeakMemory
|
||||
valueOptions: NSMapTableObjectPointerPersonality];
|
||||
}
|
||||
+ (id) weakToWeakObjectsMapTable
|
||||
{
|
||||
return [self mapTableWithKeyOptions: NSMapTableObjectPointerPersonality |
|
||||
NSMapTableWeakMemory
|
||||
valueOptions: NSMapTableObjectPointerPersonality |
|
||||
NSMapTableWeakMemory];
|
||||
}
|
||||
|
||||
|
||||
- (id) initWithKeyOptions: (NSPointerFunctionsOptions)keyOptions
|
||||
valueOptions: (NSPointerFunctionsOptions)valueOptions
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue