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:
parent
9cfc133481
commit
4f2dbe2662
2
TODO.md
2
TODO.md
|
@ -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
|
||||
- other platforms?
|
||||
|
||||
|
|
|
@ -13,10 +13,9 @@ struct mapTable *newMap(void)
|
|||
struct mapTable *m;
|
||||
|
||||
m = uiNew(struct mapTable);
|
||||
m->m = [NSMapTable mapTableWithKeyOptions:(NSPointerFunctionsOpaqueMemory | NSPointerFunctionsOpaquePersonality)
|
||||
valueOptions:(NSPointerFunctionsOpaqueMemory | NSPointerFunctionsOpaquePersonality)];
|
||||
// TODO why do I need this
|
||||
[m->m retain];
|
||||
m->m = [[NSMapTable alloc] initWithKeyOptions:(NSPointerFunctionsOpaqueMemory | NSPointerFunctionsOpaquePersonality)
|
||||
valueOptions:(NSPointerFunctionsOpaqueMemory | NSPointerFunctionsOpaquePersonality)
|
||||
capacity:0];
|
||||
return m;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue