Windows 10 Update Garbage Collection

I’ve built this app that generates screenshots and encodes them as pngs. ITs been working fine until yesterday when suddenly it has stopped working correctly. The screenshots I’m taking are admittedly pretty big (8k) but they were working just fine a few days ago. Today, not so much.

Basically my 32gb of memory just fill up and then it crashes. I’ve been looking at the profiler and it kind of looks like the garbage collection isn’t happening at all when i have incremental gc enabled.

It’s either a bug with incremental GC, or with your code. Sure you’re not holding on to the screenshot data in a way that makes it impossible to collect it?

Incremental GC is not a magic bullet to make all managed Allocations ok. It just splits the mark and sweep out over several frames taking the first one to split out the list of things to go over. If you are invalidating that list faster than it can process them, it would fall back to the stop-the-world and do it all in one frame approach.

So, if the memory that is being allocated here would be free to be released again, you might get a frame spike, but it would still get released. So it could well be that it isn’t free to be released because something is still referencing it. The Memory Profiler package should be able to help determine what that is.