The updated dstructors manual is 
[here](https://nim-lang.github.io/Nim/destructors.html)

Some notes I gathered:

1) 
[=sink](https://nim-lang.github.io/Nim/destructors.html#lifetimeminustracking-hooks-eqsink-hook)
 can be omitted, the compiler can it infer it for you but you still need to 
declare =destroy and =.

2) In =destroy you no longer need to set to nil the pointer after freeing the 
resource (recent change).

3) [sink 
inference](https://nim-lang.github.io/Nim/destructors.html#sink-parameter-inference)
 need to be turned off in some cases with closures, else the compiler errors 
(sorry don't know the specifics). This is a place better documentation is 
needed, but people in #nim helped me figure this out.

Reply via email to