diff options
author | Daniel Schürmann <daschuer@mixxx.org> | 2020-05-16 14:15:24 +0200 |
---|---|---|
committer | Daniel Schürmann <daschuer@mixxx.org> | 2020-05-16 20:55:55 +0200 |
commit | 210ff109e542ded6f6d4e00bb9c59997d794375f (patch) | |
tree | d68bfb32db127c85a4e9364e230c361d8cf97f56 /src/mixxx.cpp | |
parent | 54f744f8e534bcb567dc78610367859354e7ba46 (diff) |
don't leak ChannelHandleFactory
Diffstat (limited to 'src/mixxx.cpp')
-rw-r--r-- | src/mixxx.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/mixxx.cpp b/src/mixxx.cpp index b8517438e0..499c5e9d38 100644 --- a/src/mixxx.cpp +++ b/src/mixxx.cpp @@ -238,8 +238,6 @@ void MixxxMainWindow::initialize(QApplication* pApp, const CmdlineArgs& args) { setAttribute(Qt::WA_AcceptTouchEvents); m_pTouchShift = new ControlPushButton(ConfigKey("[Controls]", "touch_shift")); - m_pChannelHandleFactory = new ChannelHandleFactory(); - m_pDbConnectionPool = MixxxDb(pConfig).connectionPool(); if (!m_pDbConnectionPool) { // TODO(XXX) something a little more elegant @@ -252,12 +250,19 @@ void MixxxMainWindow::initialize(QApplication* pApp, const CmdlineArgs& args) { exit(-1); } + ChannelHandleFactoryPtr pChannelHandleFactory = + std::make_shared<ChannelHandleFactory>(); + // Create the Effects subsystem. - m_pEffectsManager = new EffectsManager(this, pConfig, m_pChannelHandleFactory); + m_pEffectsManager = new EffectsManager(this, pConfig, pChannelHandleFactory); // Starting the master (mixing of the channels and effects): - m_pEngine = new EngineMaster(pConfig, "[Master]", m_pEffectsManager, - m_pChannelHandleFactory, true); + m_pEngine = new EngineMaster( + pConfig, + "[Master]", + m_pEffectsManager, + pChannelHandleFactory, + true); // Create effect backends. We do this after creating EngineMaster to allow // effect backends to refer to controls that are produced by the engine. |