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 15:48:35 PDT 2017


On Tuesday, 25 April 2017 at 22:21:33 UTC, Ali Çehreli wrote:
>
> Just by guessing, what we don't see here is that there is a 
> wrapping layer that does the copying. Disposal logic is called 
> by that layer. So, your scope(exit) takes place at a higher 
> layer. Here is made-up-pseudo-code by me. :)
>
> TypeForExcel wrapper_actually_called_by_excel(/* ... */) {
>     /* ... */
>
>     double[] ret_from_your_function = FuncReturnArrayNoGc(/* 
> ... */);
>     scope (exit) disposal_function(ret_from_your_function);
>
>     TypeForExcel arg_to_excel = 
> copy_for_excel(ret_from_your_function);
>     return arg_to_excel;
> }
>

That makes it more obvious. So it still is really like a 
scope(exit), just some other function is managing when that 
occurs.




More information about the Digitalmars-d-announce mailing list