I wrapped a C ++ class using Boost.Python. These objects have strong links (boost :: shared_ptr) on the C ++ side, and there may be short-term links in Python. So far, everything is working well. However, if I create a weak python link from one of the strong links, that weak link is deleted as soon as the last python link disappears. I would like the weak link to stay alive until the last strong link to C ++ disappears. Can this be achieved?
Got another way: is there a way to find out from python if there is still a specific C ++ object (completed by Boost.Python)?
source share