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:
theraven 2012-12-11 17:49:28 +00:00
parent 0fd06dc66f
commit 38c34ba6ea
8 changed files with 110 additions and 10 deletions

View file

@ -79,6 +79,17 @@ static Class concreteClass = Nil;
{
return AUTORELEASE([[self alloc] initWithPointerFunctions: functions]);
}
+ (id) strongObjectsPointerArray
{
return [self pointerArrayWithOptions: NSPointerFunctionsObjectPersonality |
NSPointerFunctionsStrongMemory];
}
+ (id) weakObjectsPointerArray
{
return [self pointerArrayWithOptions: NSPointerFunctionsObjectPersonality |
NSPointerFunctionsWeakMemory];
}
- (void) compact
{