mirror of
https://github.com/clangen/musikcube.git
synced 2025-01-15 19:52:19 +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;
|
||||
int count = 0;
|
||||
|
||||
if (FileToByteArray(fn, &bytes, count, true)) {
|
||||
if (FileToByteArray(fn, &bytes, count, true) == true) {
|
||||
try {
|
||||
return nlohmann::json::parse(bytes);
|
||||
nlohmann::json localeData = nlohmann::json::parse(bytes);
|
||||
free(bytes);
|
||||
return localeData;
|
||||
}
|
||||
catch (...) {
|
||||
}
|
||||
@ -180,4 +182,4 @@ int Locale::Dimension(const char* key, int defaultValue) {
|
||||
}
|
||||
|
||||
return defaultValue; /* not found anywhere */
|
||||
}
|
||||
}
|
||||
|
@ -59,6 +59,7 @@ LogWindow::LogWindow(IWindow *parent)
|
||||
}
|
||||
|
||||
LogWindow::~LogWindow() {
|
||||
delete this->adapter;
|
||||
}
|
||||
|
||||
IScrollAdapter& LogWindow::GetScrollAdapter() {
|
||||
|
Loading…
Reference in New Issue
Block a user