Skip to content
Snippets Groups Projects

Consistently free G_BuildMapTitle

Merged toaster requested to merge buildtitle-memory-leak into master

G_BuildMapTitle creates Zone memory that must be freed, but wasn't. This was happening:

  • Every time a Discord RPC update occurs (every map change, skincolor change, and a handful of other cvars)
  • Every time a replay begins recording (every non-Offline Mode map change thanks to netreplays + time attack)
  • Every rendered frame a netreplay with valid map is focused and present in the top bar of the Replay Hut.
  • Every rendered frame an unlockable with a map-related condition is visible on the checklist, for each individual condition (relevant only for custom gamedata, which hasn't proven too popular for v1 thus far so this flew under the radar)
Edited by toaster

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • toaster changed the description

    changed the description

  • I have tested this in Linux 64-bit with compile flags LINUX64=1 HAVE_DISCORDRPC=1 and can confirm this fix works.

    I tested using two builds, current master 80abf386 and this branch 455177a3. I used the Replay Hut repro for testing. Although the changes in memory are slight, the current master build allocates memory and never frees it while idling and scrolling through replays. This doesn't happen in this branch, confirming the memory is being freed. Screenshot_20221217_131357

  • merged

  • toaster mentioned in commit fcddbdea

    mentioned in commit fcddbdea

Please register or sign in to reply
Loading