Skip to content

Comments

Fix log load leak#17

Open
lucasvinbr wants to merge 1 commit intowusel1007:mainfrom
lucasvinbr:fix-log-load-leak
Open

Fix log load leak#17
lucasvinbr wants to merge 1 commit intowusel1007:mainfrom
lucasvinbr:fix-log-load-leak

Conversation

@lucasvinbr
Copy link
Contributor

It seems that whenever log files were loaded, the old ones weren't being unloaded. For example, when we switch profiles in the logs tab, the "load logs" process runs again, but the memory was appearing to grow every time. I added a list to store the references for the log entries created during the load, so that, on the next load, we can delete them before creating new ones.

I'm not sure if the deletes for sf and tempDir that I added are really necessary, but it didn't crash haha

Whenever log files were loaded,
the old ones weren't being unloaded
file.flush();
}

delete tempDir;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. new without delete. memory leak...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants