Add recycling of destroyed monitors

If a destroyed monitor is created again, it will be reused. This should
prevent excessive memory growth when the same monitor is created and
destroyed again.
This commit is contained in:
Markus Mäkelä
2017-08-03 09:13:20 +03:00
parent a3e9d5c327
commit 512c3c018d
6 changed files with 131 additions and 64 deletions

View File

@ -1445,13 +1445,6 @@ static void alterMonitor(DCB *dcb, MXS_MONITOR *monitor, char *v1, char *v2, cha
{
dcb_printf(dcb, "Error: Bad key-value parameter: %s=%s\n", key, value);
}
else if (!monitor->created_online)
{
dcb_printf(dcb, "Warning: Altered monitor '%s' which is in the "
"main\nconfiguration file. These changes will not be "
"persisted and need\nto be manually added or set again"
"after a restart.\n", monitor->name);
}
}
else
{