C XTREE崩溃在出口上,映射/设置迭代器不可用
C++ XTree crash on exit, map/set iterator not dereferencable
我有一些静态类,其中std :: map在其中,一切正常,但是当我退出程序时,它会以错误的"映射/设置迭代器不可删除"崩溃。
这是地图:
struct DataSegment_P { std::string type; };
template <typename T> struct DataSegment : public DataSegment_P{ T value; };
static std::map<std::string, DataSegment_P*> data;
另外两个:
static std::map<std::string, std::shared_ptr<sf::Texture>> textures;
static std::map<std::pair<std::string, std::vector<int>>, std::shared_ptr<sf::Sprite>> sprites;
和最后一个:
struct Asset {
std::map<std::string, std::string> values;
};
static std::map<std::string, std::vector<std::shared_ptr<Asset>>> assets;
我不能在这里真正粘贴整个代码,因为它是数千行的长度,但是我要清理图。
好吧,我发现了问题。对不起,但是您无法猜到它,所以我只是指出问题,所以如果像我这样的人可以解决它。
我正在使用SFML,我发现您不能在其中使用SF :: RenderWindow的智能指针。那就是导致坠机的原因。
相关文章:
- 确定设置迭代器的顺序
- C++映射/设置迭代器不可递增错误
- C XTREE崩溃在出口上,映射/设置迭代器不可用
- 尝试设置迭代器时会遇到奇怪的错误
- c++映射/设置迭代器不可取消引用
- C2676 二进制"++":设置迭代器<TElement>未定义此运算符
- 映射/设置迭代器在 std::map 中不可递增
- 映射/设置迭代器未解除可绑定运行时错误
- 调试断言失败映射/设置迭代器不可取消引用
- 为什么C++设置迭代器不能转换为布尔值?
- 尝试在 for 循环中使用设置迭代器时与"运算符<"不匹配
- 映射/设置迭代器不可递增
- 设置迭代器因移动语义失效
- C++设置迭代器删除
- C++映射/设置迭代器在使用多映射时出现不可增加的错误
- 映射/设置迭代器不可递增映射/设置迭代器不可递增
- C++ 映射/设置迭代器不可取消引用 --- map<const char *,字符串>
- 映射/设置迭代器不兼容[c++]
- std::设置迭代器常量限定符
- c++设置迭代器后的下一个分隔符递归