mirror of https://github.com/Icinga/icinga2.git
Properly shut down the interpreter when the Script object is being destroyed.
This commit is contained in:
parent
8e672167dc
commit
2485a04694
|
@ -32,6 +32,12 @@ Script::Script(const Dictionary::Ptr& properties)
|
||||||
: DynamicObject(properties)
|
: DynamicObject(properties)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
|
Script::~Script(void)
|
||||||
|
{
|
||||||
|
if (m_Interpreter)
|
||||||
|
m_Interpreter->Stop();
|
||||||
|
}
|
||||||
|
|
||||||
void Script::OnInitCompleted(void)
|
void Script::OnInitCompleted(void)
|
||||||
{
|
{
|
||||||
SpawnInterpreter();
|
SpawnInterpreter();
|
||||||
|
|
|
@ -37,6 +37,7 @@ public:
|
||||||
typedef weak_ptr<Script> WeakPtr;
|
typedef weak_ptr<Script> WeakPtr;
|
||||||
|
|
||||||
Script(const Dictionary::Ptr& properties);
|
Script(const Dictionary::Ptr& properties);
|
||||||
|
~Script(void);
|
||||||
|
|
||||||
String GetLanguage(void) const;
|
String GetLanguage(void) const;
|
||||||
String GetCode(void) const;
|
String GetCode(void) const;
|
||||||
|
|
Loading…
Reference in New Issue