excel-d v0.0.1 - D API to write functions callable from Excel
jmh530 via Digitalmars-d-announce
digitalmars-d-announce at puremagic.com
Tue Apr 25 13:20:08 PDT 2017
On Monday, 24 April 2017 at 21:59:34 UTC, Atila Neves wrote:
>
> Enter the `@Dispose` UDA:
>
I found this really interesting.
Am I understanding the process correctly: apply map to numbers,
allocate and return a new array in D, copy it to Excel, call
dispose to free the D memory.
So if you instead used something like
scope(exit) Mallocator.instance.dispose(dArg);
then Excel wouldn't be able to use it because it would be freed
by D already?
It seems like your @Dispose UDA could have many uses outside of
just the excel-d package. If I understand correctly, it's similar
to C++ smart pointers, but not exactly the same. I'm still not
sure I totally grok it though.
More information about the Digitalmars-d-announce
mailing list