Eh, the best way to find memory leaks is to push the build out the the public and have them fill the memory.
I actually disagree. The memory could easily be filled by a small and dedicated group of testers in the development setting. I played the dev branch and never saw these issues, so I'm assuming they took everyone by surprise. The logical course, rather than pushing updates out to the main branch and having everyone die of a rage-induced brain aneurysm, is to set up some very high resource servers in the dev build and do heavy duty stress tests. I'm wildly guessing the lag might be related to having to keep track of the changing status of so many auto-building modules, so even a group of 10 players building castles and dozens of small homes would have picked up some evidence of the leak... and an attentive dev build server host/owner could have helped pinpoint and provided logs/metrics to Facepunch.