windowmanager destructor free _mainwindow, fix save - remove const in (#36)

* windowmanager destructor free _mainwindow, fix save - remove const in
settingsPath that is being written to from ptree tree

* syntax error

* remove destructor, singleton, let OS claim the resource as no special cleanup of _mainWindow is not needed
This commit is contained in:
hemirt 2017-04-14 14:08:57 +02:00 committed by fourtf
parent d96c4a5c91
commit 744940ffd5
5 changed files with 6 additions and 3 deletions

View file

@ -2,6 +2,7 @@
#define MESSAGEBUILDER_H
#include "messages/message.h"
#include <ctime>
namespace chatterino {
namespace messages {

View file

@ -1,6 +1,7 @@
#ifndef WINNATIVEWINDOW_H
#define WINNATIVEWINDOW_H
#define NOMINMAX
#include "Windows.h"
#include "Windowsx.h"

View file

@ -4,6 +4,7 @@
#include "twitch/twitchuser.h"
#include <mutex>
#include <vector>
namespace chatterino {

View file

@ -10,6 +10,7 @@
#include <boost/foreach.hpp>
#ifdef USEWINSDK
#define NOMINMAX
#include "Windows.h"
#endif

View file

@ -10,8 +10,7 @@ namespace chatterino {
WindowManager WindowManager::instance;
WindowManager::WindowManager()
: _windowMutex()
, _mainWindow(nullptr)
: _mainWindow(nullptr)
{
}
@ -103,7 +102,7 @@ void WindowManager::load()
void WindowManager::save()
{
const auto &settingsPath = getSettingsPath();
auto &settingsPath = getSettingsPath();
boost::property_tree::ptree tree;
// Create windows array