NSMapTable and NSPointerArray work in GC mode. They were working in ARC mode, but it turns out that Apple implements the wrong semantics for them so they're now broken to be Apple compatible.
In both ARC and GC modes, the __weak qualifier works correctly[1], so there's no reason why implementing such a thing should be hard. Reintroducing the sane semantics for NSMapTable and friends (where weak means weak) as an optional GNUstep extension is something that has been on my todo list for a while but got bumped down by higher-priority things. David [1] If you compile with clang and link with GNUstep libobjc On 14 Jun 2012, at 10:04, Thomas Davie wrote: > Hi all, > > Just wondering before I go off and code my own... Does anyone know of an > implementation of a weak dictionary (or array/set for that matter) that > compiles successfully on GNUstep? There's obviously MAWeakDictionary, but > that's heavily reliant on chunks of CF that don't exist. I could go out > there and make an NSDictionary like thing that wraps every object you put in > it in a weak reference object, but it seems like there should be a pre-baked > solution to this. > > Tom Davie > _______________________________________________ > Discuss-gnustep mailing list > [email protected] > https://lists.gnu.org/mailman/listinfo/discuss-gnustep -- Sent from my PDP-11 _______________________________________________ Discuss-gnustep mailing list [email protected] https://lists.gnu.org/mailman/listinfo/discuss-gnustep
