Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix scalelight[] memory leak #1208

Merged
merged 1 commit into from
Jul 24, 2024
Merged

Fix scalelight[] memory leak #1208

merged 1 commit into from
Jul 24, 2024

Conversation

JNechaevsky
Copy link
Collaborator

This fixes memory leak (over-consumption) by toggling detail mode or changing screen size. Few remarks:

  • Probably not worth a comment, as this is our own code not a Chocolate one.
  • Nothing for Heretic & Hexen since there is not smooth diminished lighting. It's a must have for TrueColor to be honest, but I'm not sure how to fit it in Crispness menu.
  • This approach is pretty much same to Woof one.

Small note - it was barely possible to notice a leak while non-TrueColor build, obliviously because of smaller lighttable_t size. However, while experimenting with colored lighting and having 28 extra colormaps (both scalelight and zlight, TrueColor only approach), such leak costs about ~400 kilobytes every time R_ExecuteSetViewSize was hit! Never thought such experiments will be that useful. 🙂

Copy link
Owner

@fabiangreffrath fabiangreffrath left a comment

Choose a reason for hiding this comment

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

Thank you!

@JNechaevsky JNechaevsky merged commit 495d78d into master Jul 24, 2024
5 checks passed
@JNechaevsky JNechaevsky deleted the scaleleak branch July 24, 2024 09:04
JNechaevsky added a commit to JNechaevsky/international-doom that referenced this pull request Jul 24, 2024
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