> I mean somehow I have to tell Nim when to free memory right?

Yeah sure, you just use these: 
[alloc](http://forum.nim-lang.org///nim-lang.org/docs/system.html#alloc,Natural),
 
[dealloc](http://forum.nim-lang.org///nim-lang.org/docs/system.html#dealloc,pointer),
 
[allocShared](http://forum.nim-lang.org///nim-lang.org/docs/system.html#allocShared,Natural),
 
[deallocShared](http://forum.nim-lang.org///nim-lang.org/docs/system.html#deallocShared,pointer).
 You can cast the `pointer` from and to 
[ptr](http://forum.nim-lang.org///nim-lang.org/docs/system.html#ptr) types and 
then you have your manually managed heap memory.

(This is a general answer to how to use non-GC'd memory and has nothing to do 
with memory regions)

Reply via email to