Opened 9 years ago
Closed 8 years ago
#3225 closed defect (fixed)
[PATCH] Fix memory leak in replay mode
Reported by: | kanetaka | Owned by: | ben |
---|---|---|---|
Priority: | Should Have | Milestone: | Alpha 20 |
Component: | Core engine | Keywords: | wmain leak replay |
Cc: | kanetaka | Patch: |
Description
Temporary buffer allocation in wmain() causes memory leak in replay mode, because free() is skipped in case of replay mode. There are many leaks in replay mode, because exit path is different from normal game play, which cause to skip to free/delete pointers.
Attachments (1)
Change History (5)
by , 9 years ago
Attachment: | wseh.cpp.patch added |
---|
comment:1 by , 9 years ago
comment:3 by , 9 years ago
Milestone: | Alpha 19 → Alpha 20 |
---|
Pushing this to A20, as we're not going to update SDL (nor introduce breaking changes to wmain) now.
Note:
See TracTickets
for help on using tickets.
This sort of duplicates #3138, which removes wmain. That still needs SDL 2.0.4 to be released (or us building a hg version of it).
Replay mode, as every other special-cased mode has issues like this and likely a few others (mod mounting logic in a few places instead of one, init of stuff, ...) but this should best be fixed by using the init/shutdown code paths up to the point we need.