When an Python CORBA object is wrap_delete twice, after one of the two is deleted by Python, the corresponding servant in C++ gets deleted. When the second is deleted, an exception is raised. Sadly, at the moment, in Python, it is not possible to count the number of reference to a C++ servant so it is hard to avoid such situation.
This PR bypasses the issue by not raising an error when trying to delete an already deleted object. This should be safe since there is semantically no work to do to delete an already deleted object.
Another possible solution is to catch the exception in the _Deleter class in Python.
When an Python CORBA object is
wrap_delete
twice, after one of the two is deleted by Python, the corresponding servant in C++ gets deleted. When the second is deleted, an exception is raised. Sadly, at the moment, in Python, it is not possible to count the number of reference to a C++ servant so it is hard to avoid such situation.This PR bypasses the issue by not raising an error when trying to delete an already deleted object. This should be safe since there is semantically no work to do to delete an already deleted object.
Another possible solution is to catch the exception in the
_Deleter
class in Python.