增强蝇量级恐慌
boost flyweight panics
本文关键字:增强 更新时间:2023-10-16
我正在使用Boost 1.39。我已经使用 boost::flyweight<no_locking, hashed_factory<> >
实现了我的类(我的应用程序是单线程的)。我的类的测试程序通过得很好,但是当我在应用程序中使用 in 时,我感到恐慌
#9 0x08de7c3e in boost::flyweights::detail::refcounted_value<boost::flyweights::detail::default_value_policy<SharedFileAttr>::rep_type, SharedFileAttr>::release (this=0x0) at /usr/include/boost/flyweight/refcounted.hpp:89
#10 0x08de7517 in boost::flyweights::detail::refcounted_handle<boost::flyweights::detail::refcounted_value<boost::flyweights::detail::default_value_policy<SharedFileAttr>::rep_type, SharedFileAttr> const*, boost::flyweights::detail::flyweight_core_tracking_helper<boost::flyweights::detail::default_value_policy<SharedFileAttr>, mpl_::na, boost::flyweights::refcounted, boost::flyweights::hashed_factory<mpl_::na, mpl_::na, mpl_::na, 0>, boost::flyweights::no_locking, boost::flyweights::static_holder> >::~refcounted_handle (this=0xf32fe61c,
__in_chrg=<value optimized out>) at /usr/include/boost/flyweight/refcounted.hpp:131
#11 0x08e2edfe in boost::flyweights::flyweight<SharedFileAttr, boost::flyweights::no_locking, boost::flyweights::hashed_factory<mpl_::na, mpl_::na, mpl_::na, 0>, boost::parameter::void_, boost::parameter::void_, boost::parameter::void_>::operator= (this=0xf32fe7e4, x=...)
at /usr/include/boost/flyweight/flyweight.hpp:196
请注意,在第 #9 帧中,这是0x0
我不确定我的代码怎么可能使用 boost::flyweight 导致引用计数问题。毕竟,我的界面只包含添加蝇量级对象并销毁它们的方法。
我不知道如何找出问题所在。有什么想法吗?
嗯,很尴尬,但问题是试图将一个未初始化的蝇量级对象分配给另一个对象。必须记住初始化所有类成员...
相关文章:
- 无法将结构注册为增强几何体3D点
- 增强基于 XML class_id的反序列化
- 增强精神解析器规则以检测语句中的特殊结尾
- C++ 使用增强正则表达式库时断言崩溃
- 增强精神 X3:错误:在"..."中没有名为"大小"的类型
- 如何包装(撰写)增强 hana 地图并访问括号运算符(运算符 [])?
- 有没有办法在C ++中检测汉字?(使用增强)
- 如何将增强MSM与增强信号结合使用?
- 如何使用增强::几何计算多边形的旋转固体体积?
- 复制部分文件的C++/增强方式
- 增强 ASIO 和串行端口异步读取
- 增强 Hana index_if和类型
- 增强超几何测试
- 如何修改增强 hana 结构的成员
- 增强纤维work_stealing屏障会导致段错误
- 增强循环缓冲区push_back在前面插入数据
- 彩色增强::日志显示偏移的颜色
- 增强序列化,按基类型加载存档类会产生错误的数据
- C++构建增强 1.57.0 VS2013 x64 本机工具命令提示符
- 增强二进制存档 - 减小大小