OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::anonymous_namespace{PythonPluginBridge.cpp}::PluginInstanceHandle Struct Reference
Collaboration diagram for Slic3r::anonymous_namespace{PythonPluginBridge.cpp}::PluginInstanceHandle:

Public Member Functions

 ~PluginInstanceHandle ()

Public Attributes

std::shared_ptr< PluginCapabilityInterface > plugin
py::object keep_alive

Detailed Description

Constructor & Destructor Documentation

◆ ~PluginInstanceHandle()

Slic3r::anonymous_namespace{PythonPluginBridge.cpp}::PluginInstanceHandle::~PluginInstanceHandle ( )
inline
62 {
63 if (keep_alive) {
64 // Dropping a py::object decrefs the Python object, so acquire a runtime lease and
65 // the GIL. If shutdown has already won the lease, intentionally abandon the wrapper.
66 PythonGILState gil;
67 if (gil) {
68 keep_alive = py::object();
69 } else {
70 (void) keep_alive.release();
71 }
72 }
73 }
py::object keep_alive
Definition PythonPluginBridge.cpp:59

References keep_alive.

Member Data Documentation

◆ keep_alive

py::object Slic3r::anonymous_namespace{PythonPluginBridge.cpp}::PluginInstanceHandle::keep_alive

Referenced by ~PluginInstanceHandle().

◆ plugin

std::shared_ptr<PluginCapabilityInterface> Slic3r::anonymous_namespace{PythonPluginBridge.cpp}::PluginInstanceHandle::plugin

The documentation for this struct was generated from the following file: