Using the following way of how to add swagger-ui support when different than default model is used I noticed that strange errors were reported by Fastmm and a lot of leaked memory objects were left on termination.
If you are using http.sys server, when stopping it, you should wait to finish the stopping process:
HttpSysSrv.stop; while HttpSysSrv.IsRunning do sleep(50);
The model that was created as described in the above link, then should be freed;
Fastmm will be happy then, and no leaks will exist