Skip to content

Conversation

@coledot
Copy link

@coledot coledot commented Feb 21, 2021

First iteration of a set of fixes that aim to resolve memory leaks in the game.

This set of fixes targets mostly message subscriptions that are added but never properly removed. This inflates not only the size of the MessageCenter, but leaks a large number of objects by having references to them persist in the MessageCenter.

Saves ~70MB per contract that's been completed.

@coledot coledot marked this pull request as ready for review February 21, 2021 17:28
@CptMoore
Copy link

Already asked for a dll in the other PR. I have small stutters after playing one map, that get progressively worse over time (rotation of your ship stutters ever so slightly) . I know memory leaks existed, but didnt really knew how to figure this out. This could be really helpful and might fix my stuttering.

@coledot
Copy link
Author

coledot commented Feb 22, 2021

https://drive.google.com/file/d/1XthU7h6tmLR5xfpVqGC6Wjh4lGbExfQ7/view?usp=sharing

After renaming, you should be able to just drop-in replace it for the main .dll

To enable set "MemoryLeakFix" = true, in your settings.json

I'd be surprised if this particular fix addressed your stuttering, there are many other larger leaks to be plugged. But who knows for sure until you try it?

@CptMoore
Copy link

Well the amount of message center subscriptions was probably the issue.
Load save game into the campaign map. Quit to main menu, load same save again. Accelerate and see rotation.

Without your fix: small stuttering (would increase the more I load)
With your fix: almost no stuttering (like after first load)

However i did have a floating mechicon (atlas) from the mechbay when switching screens during normal usage. That went away when switching to and away from the mechbay again.

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