This is interesting, I’m running double your ram (16 gigs) and haven’t had a crash due to memory leakage. After 5-6 hours I’ll cap out at around 9 gigs used across my whole system, which is typically almost all stonehearth.
It might not be an amazing solution, but if you’re willing to throw down for another set of compatible sticks and get another 8 gigs (I mean, I assume you’re running 2x4 in dual channel, so upping to 4x4 would be your best bet) and you might be able to beat the memory leaks.
I only really suggest this since on the Tuesday stream a little while ago we got to talking about optimization and the devs mentioned not doing another pass for a few builds. So I would settle in with some of these things for a bit; especially when you consider how bad the game used to be 2-3 builds ago!
I didn’t recognize your processor type (I don’t really play around with AMD much), so I did a little digging. It’s certainly not the end-all be-all, but your 770k gets absolutely crushed by a i7-4790k (links below), which I imagine is giving you a lot of trouble with stuttering and lag. I used to run stonehearth on a stock AMD 6120 and was able to get to around 20 hearthlings before running to a lot of issues.
TLDR: maybe consider a processor switch/the minimum system requirements