Bit of an unusual setup here,
- I'm creating mods for the video game RUST
- It uses HARMONY to load mods into the server code
- At some point I did something to cause a memory leak, the application grows from 10GB in memory to 30GB over the course of a day with hundreds of players using it.
- The mods are written in C#, but Unity's core is C++
- Unloading all of the mods does not cause the GC to clean up the used memory, even when calling gc.collect manually.
I've tried hooking up traditional memory profilers like ANTS and dotMemory but they do not connect -- I'm sure that's to do with not having a release build or the fact that it's a Unity application.
I've tried attaching the Unity debugger, but it fails to recognize the game.
I'm running out of options, does anyone know if it's possible to ask the GC to dump what objects are currently being tracked? Perhaps its possible to use Harmony to hook into the actual allocation of memory step in the GC and I could track manually?