CppDeviceClassWrap::delete_class is not used
I noticed that PyTango provides a non-empty implementation of DeviceClass::delete_class for CppDeviceClassWrap:
https://gitlab.com/tango-controls/pytango/-/blob/e615ddec9419cf344f4b19b1318e030b8320ee98/ext/server/device_class.cpp#L306-325
This is related to the constructed_classes global variable but I haven't checked its purpose.
Now the problem is that cppTango only calls DeviceClass::delete_class if DeviceClass::is_py_class returns true. This currently never happens because you do not call DeviceClass::set_py_class(true). This was called in PyTango in 3.0.02 from CppDeviceClassWrap::init_class but this is no longer the case. I haven't checked when PyTango stopped setting this.
I'm doing some cleanup in cppTango in cppTango!906 (merged). I completely removed set_py_class/is_py_class and delete_class is no longer called. I tested PyTango with this new version and everything seems to work (except asyncio tests which I couldn't run because Python 3.10 is not supported).
I think that there is no issue in PyTango, I just wanted to let you know about the situation. Perhaps you could do some cleanup and remove this dead code. If I'm wrong and DeviceClass::delete_class is actually needed please shout before cppTango!906 (merged) gets merged. Thanks!