boostorg / boostorg/python

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

Aperta
#65 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
C++
Stelle
537
Fork
223
Merge medio
11h 22m
PR unite (30g)
2

Descrizione

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

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.