mirror of
https://github.com/clangen/musikcube.git
synced 2025-01-30 06:32:36 +00:00
Merge branch 'mem'
save memory leak fixes
This commit is contained in:
commit
1fb179f45c
@ -55,9 +55,11 @@ static nlohmann::json loadLocaleData(const std::string& fn) {
|
|||||||
char* bytes = nullptr;
|
char* bytes = nullptr;
|
||||||
int count = 0;
|
int count = 0;
|
||||||
|
|
||||||
if (FileToByteArray(fn, &bytes, count, true)) {
|
if (FileToByteArray(fn, &bytes, count, true) == true) {
|
||||||
try {
|
try {
|
||||||
return nlohmann::json::parse(bytes);
|
nlohmann::json localeData = nlohmann::json::parse(bytes);
|
||||||
|
free(bytes);
|
||||||
|
return localeData;
|
||||||
}
|
}
|
||||||
catch (...) {
|
catch (...) {
|
||||||
}
|
}
|
||||||
|
@ -59,6 +59,7 @@ LogWindow::LogWindow(IWindow *parent)
|
|||||||
}
|
}
|
||||||
|
|
||||||
LogWindow::~LogWindow() {
|
LogWindow::~LogWindow() {
|
||||||
|
delete this->adapter;
|
||||||
}
|
}
|
||||||
|
|
||||||
IScrollAdapter& LogWindow::GetScrollAdapter() {
|
IScrollAdapter& LogWindow::GetScrollAdapter() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user