[C++-sig] Details of Boost.Python Py_Finalize issue?

Ravi lists_ravi at lavabit.com
Wed Aug 5 04:33:39 CEST 2009


On Sunday 02 August 2009 11:44:22 Haoyu Bai wrote:
> So could anyone share your experience with this issue, provide some
> test case or anymore information about this issue? I will try to solve
> it.

I haven't been able to spend any time on this. But the general approach I 
wanted to check is as follows:

Test 1 (to check registry operation):
1. Use an example which embeds (not extends) python.
2. Register a type X to be converted to C++ type XC.
3. Perform some operations to verify that step 2 works.
4. Call PyFinalize.
5. Restart python vising PyInit...
6. Check that X does not convert to XC.

Test 2 (to check object cleanup):
1. Hold weak pointers to some shared_ptr<T> objects exposed to python.
2. Call PyFinalize.
3. Ensure that all the weak_ptrs point to deleted objects.

Let me think about this some more. Please try pinging Dave A directly to make 
sure he has no tests for you to try.

Regards,
Ravi



More information about the Cplusplus-sig mailing list