but its destructor might not be called, and the scripts might hang forever, eg in cosypose run_inference_on_example, where the scope is never destroyed.
This can be quickly workaround by creating main() functions, but it should be refactored to avoid this kind of issues.
panda3d batch renderer needs to be deleted to stop its subprocesses: https://github.com/agimus-project/happypose/blob/6f06ad7fe34c8b866fac460b00004b1a5efd61fd/happypose/toolbox/renderer/panda3d_batch_renderer.py#L347
but its destructor might not be called, and the scripts might hang forever, eg in cosypose run_inference_on_example, where the scope is never destroyed.
This can be quickly workaround by creating
main()
functions, but it should be refactored to avoid this kind of issues.