boostorg / boostorg/python

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

Open
#65 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
537
Forks
223
Avg merge
11h 22m
Merged PRs (30d)
2

Description

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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.