Really fixed the NSMapTable nonsense now. Added a TODO to go through the rest of the code for the same.

This commit is contained in:
Pietro Gagliardi 2016-01-07 16:01:11 -05:00
parent 9cfc133481
commit 4f2dbe2662
2 changed files with 5 additions and 4 deletions

View File

@ -1,3 +1,5 @@
- go through ALL the objective-c objects we create and make sure we are using the proper ownership (alloc/init and new are owned by us, all class method constructors are autoreleased - thanks mikeash)
- on OS X, edit shortcuts like command-C working require that the menu entries be defined, or so it seems, even for NSAlert - on OS X, edit shortcuts like command-C working require that the menu entries be defined, or so it seems, even for NSAlert
- other platforms? - other platforms?

View File

@ -13,10 +13,9 @@ struct mapTable *newMap(void)
struct mapTable *m; struct mapTable *m;
m = uiNew(struct mapTable); m = uiNew(struct mapTable);
m->m = [NSMapTable mapTableWithKeyOptions:(NSPointerFunctionsOpaqueMemory | NSPointerFunctionsOpaquePersonality) m->m = [[NSMapTable alloc] initWithKeyOptions:(NSPointerFunctionsOpaqueMemory | NSPointerFunctionsOpaquePersonality)
valueOptions:(NSPointerFunctionsOpaqueMemory | NSPointerFunctionsOpaquePersonality)]; valueOptions:(NSPointerFunctionsOpaqueMemory | NSPointerFunctionsOpaquePersonality)
// TODO why do I need this capacity:0];
[m->m retain];
return m; return m;
} }