Nim's better than dlang in this respect. Default memory management is similar to C++ and Rust. See https://nim-lang.org/docs/destructors.html