boostorg / boostorg/python

Python crash on deleting shared_ptrs stored in a C++ vector

未关闭
#65 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
C++
星标
537
派生
223
平均合并
11 小时 22 分钟
30 天内合并 PR
2

描述

Hi,

There is a struct A defined in C++ and exposed to python as shared_ptr.
There are two global vectors of shared_ptrs of A.
Create and add a object of type A from python to C++ in the two vectors
Clear one vector
Then when the python exits the program crashes with access violation
error, while deleting the shared_ptrs

[TestShared.zip](https://github.com/boostorg/python/files/241747/TestShared.zip)

Environment: Boost 1.58.0, compiler VS 2012

I have attached both C++ and python file to recreate this issue.

Thanks

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。