On 5/22/2020 10:54 AM, Atila Neves wrote:
BTW, you should fix that invalid attribute, freeing a pointer is never @safe
unless you can guarantee nobody else has a copy of that pointer (and
considering it's passed by value, the CALLER still has that pointer!)
You're completely right.
@live is intended to fix that!
To get ahead of the curve, annotate pointer parameters with `scope` if you don't
intend to transfer ownership to the callee. Better yet, use `ref` instead of
pointer parameters where possible.