That's mentioned in the manual. There is no "clean up". It's no leak, but simply fragmented memory. You must restart. No way around. It does not matter if your strategy is C or DLL.