I am trying to use std :: list in my objective-c program and have runtime problems.
I have (edit for short)
#import <list> ... @interface Foo { std::list<Bar *> *myList; } ... @implementation Foo -(void)loopList { myList = new std::list<Bar *>; for (std::list<Bar *>::iterator ii; ii != myList->end(); ++ii) { // Do nothing here } }
Everything compiles fine, but I get EXC_BAD_ACCESS during the execution of the for loop. I don't do anything with the content, I just loop them (for now).
I would use NSMultableArray, but I need to quickly insert and remove elements during iteration, which is not possible. Also, I would like to use stl for performance issues.
I have my sourcecode.cpp.objcpp files installed.
Thanks in advance.
source share