MXS-1775 Change assumption of Monitor::destroy() function
Used to be assumed to be a static member function, now assumed to be a regular member function.
This commit is contained in:
parent
a31549221b
commit
d5871e48ae
@ -40,7 +40,7 @@ public:
|
||||
|
||||
static void destroyInstance(MXS_MONITOR_INSTANCE* pInstance)
|
||||
{
|
||||
MXS_EXCEPTION_GUARD(MonitorInstance::destroy(static_cast<MonitorInstance*>(pInstance)));
|
||||
MXS_EXCEPTION_GUARD(static_cast<MonitorInstance*>(pInstance)->destroy());
|
||||
}
|
||||
|
||||
static bool startMonitor(MXS_MONITOR_INSTANCE* pInstance,
|
||||
|
@ -36,7 +36,7 @@ struct GRMon : public MXS_MONITOR_INSTANCE
|
||||
GRMon& operator&(const GRMon&);
|
||||
public:
|
||||
static GRMon* create(MXS_MONITOR* monitor);
|
||||
static void destroy(GRMon* monitor);
|
||||
void destroy();
|
||||
bool start(const MXS_CONFIG_PARAMETER* params);
|
||||
void stop();
|
||||
void diagnostics(DCB* dcb) const;
|
||||
@ -75,6 +75,11 @@ GRMon* GRMon::create(MXS_MONITOR* monitor)
|
||||
return new GRMon(monitor);
|
||||
}
|
||||
|
||||
void GRMon::destroy()
|
||||
{
|
||||
delete this;
|
||||
}
|
||||
|
||||
bool GRMon::start(const MXS_CONFIG_PARAMETER* params)
|
||||
{
|
||||
bool started = false;
|
||||
|
@ -171,9 +171,9 @@ bool MariaDBMonitor::start(const MXS_CONFIG_PARAMETER* params)
|
||||
return !error;
|
||||
}
|
||||
|
||||
void MariaDBMonitor::destroy(MariaDBMonitor* monitor)
|
||||
void MariaDBMonitor::destroy()
|
||||
{
|
||||
delete monitor;
|
||||
delete this;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -80,10 +80,8 @@ public:
|
||||
|
||||
/**
|
||||
* Destroyes aka deletes the instance.
|
||||
*
|
||||
* @param monitor The instance to be finished.
|
||||
*/
|
||||
static void destroy(MariaDBMonitor* monitor);
|
||||
void destroy();
|
||||
|
||||
/**
|
||||
* Stop the monitor. Waits until monitor has stopped.
|
||||
|
Loading…
x
Reference in New Issue
Block a user