Commit f70eb638 authored by Max Kellermann's avatar Max Kellermann

Instance: eliminate FinishShutdownUpdate(), move code to destructor

parent 99c23cf1
......@@ -31,6 +31,7 @@
#ifdef ENABLE_DATABASE
#include "db/DatabaseError.hxx"
#include "db/Interface.hxx"
#include "db/update/Service.hxx"
#include "storage/StorageInterface.hxx"
#ifdef ENABLE_SQLITE
......@@ -53,6 +54,8 @@ Instance::Instance()
Instance::~Instance() noexcept
{
#ifdef ENABLE_DATABASE
delete update;
if (database != nullptr) {
database->Close();
delete database;
......
......@@ -167,7 +167,6 @@ struct Instance final
#endif
void BeginShutdownUpdate() noexcept;
void FinishShutdownUpdate() noexcept;
#ifdef ENABLE_CURL
void LookupRemoteTag(const char *uri) noexcept;
......
......@@ -352,14 +352,6 @@ Instance::BeginShutdownUpdate() noexcept
}
inline void
Instance::FinishShutdownUpdate() noexcept
{
#ifdef ENABLE_DATABASE
delete update;
#endif
}
inline void
Instance::BeginShutdownPartitions() noexcept
{
for (auto &partition : partitions) {
......@@ -634,8 +626,6 @@ mpd_main_after_fork(const ConfigData &raw_config, const Config &config)
}
#endif
instance->FinishShutdownUpdate();
#ifdef ENABLE_SQLITE
sticker_global_finish();
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment