resolved file buffer and log window memory leaks

This commit is contained in:
KTRosenberg 2017-08-06 23:04:07 -04:00
parent 46752e64a5
commit 5559000db5
3 changed files with 8 additions and 53804 deletions

View File

@ -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 */
}
}

View File

@ -59,6 +59,9 @@ LogWindow::LogWindow(IWindow *parent)
}
LogWindow::~LogWindow() {
if (this->adapter != nullptr) {
delete this->adapter;
}
}
IScrollAdapter& LogWindow::GetScrollAdapter() {

53801
src/tags

File diff suppressed because it is too large Load Diff