The GC does release memory under certain 
[circumstances](https://github.com/nim-lang/Nim/blob/b07694cd90ab7c6eb4660971ddb818b461d4eed8/lib/system/alloc.nim#L861).
 The code is rather hard to follow though, and I'm not sure _when_ exactly 
would the GC release memory back to OS. But if you allocate a 2GB string then 
discard it, the GC will later collect that memory and release it to the OS 
(this can be forced via a call to `GC_fullCollect`).

Reply via email to