3 ms·
Nim memory management is tied to the type you use. You either use: - an object. Which is on the stack and is either trivial or uses destructors and is suitabl
by mratsim 7y ago
Nim memory management is tied to the type you use.
You either use:
- an object. Which is on the stack and is either trivial or uses destructors and is suitable for embedded due to deterministic memory management
- a pointer object. Which is a raw pointer like C *. Managed directly via raw malloc/free or Nim malloc/free. Suitable for embedded
- a reference type. Which is managed by one of Nim GC or is an error if you use gc:none