I've tried turning on the Call C++ Default Ctors/Dtors in Objective-C
flag but I'm still getting an EXC_BAD_ACCESS
error when I first try to access my map:
(*[TextureBatcher getSharedTextureBatcher].getMap)[texID].vertexCount=0;
(*[TextureBatcher getSharedTextureBatcher].getMap)[texID].indexCount=0;
getMap just returns a reference to my map:
-(VertexMap *) getMap{
return &texMap;
}
And a VertexMap is a typedef of a std::map:
typedef std::map<GLuint, VertexInfo> VertexMap;
Not sure why this is failing on device and not in the simulator, any thoughts?