#1563 closed defect
GUI: memory leaks in 0.6.0 on windows
Reported by: | SF/matt_hargett | Owned by: | fingolfin |
---|---|---|---|
Priority: | normal | Component: | GUI |
Version: | Keywords: | ||
Cc: | Game: |
Description
Just did a run through BoundsChecker and detected these leaks. Looking at the code, they sure look like leaks to me as well. They appear to be related WindowsFilesystemNode::addFile(), which was called many times as I was browsing the filesystem and adding games via the launcher UI.
String::ensureCapacity (str.cpp, L209) char *newStr = (char *)calloc(1, newCapacity+1);
WindowsFilesystemNode::clone (windows-fs.cpp, line 54) virtual FilesystemNode *clone() const { return new WindowsFilesystemNode(this); }
WindowsFilesystemNode::listDir (windows-fs.cpp, line 143) FSList *myList = new FSList();
All of these are not one-time leaks, and happen many many times. I can give more details if necessary, but it looks pretty obvious to me.
Ticket imported from: #922928. Ticket imported from: bugs/1563.
Change History (5)
comment:1 by , 21 years ago
comment:2 by , 21 years ago
Owner: | set to |
---|---|
Summary: | memory leaks in 0.6.0 on windows → GUI: memory leaks in 0.6.0 on windows |
comment:4 by , 21 years ago
Status: | new → closed |
---|
comment:5 by , 6 years ago
Component: | → GUI |
---|
I don't think the String class is leaking; however, the FSNodes have strings as members, so if they leak, then of course also string objects get leaked.
The only leak I found was in addGame(). Try modifying gui/launcher.cpp, LauncherDialog::addGame(), insert line 411:
delete files; files = 0;
Does that help?