MCPcopy Create free account
hub / github.com/CVCUDA/CV-CUDA / Cleanup

Method Cleanup

python/common/PyUtil.cpp:33–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31{
32public:
33 Cleanup()
34 {
35 NVCV_ASSERT(m_instance == nullptr && "Only one instance of Cleanup can be instantiated");
36 m_instance = this;
37
38 // Functions registered with python's atexit will be executed after
39 // the script ends without fatal errors, but before python interpreter is torn down.
40 // That's a good place for our cleanup.
41 auto py_atexit = py::module_::import("atexit");
42 py_atexit.attr("register")(py::cpp_function(&doCleanup));
43 }
44
45 ~Cleanup()
46 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected