new int[]

Adam D. Ruppe destructionator at gmail.com
Wed Jan 10 22:48:48 UTC 2018


On Wednesday, 10 January 2018 at 22:46:30 UTC, ag0aep6g wrote:
> If I understand correctly, the goal is to have the `int[]` 
> itself on the GC heap.

General word of warning: if you pass it to C and the C function 
holds on to that pointer for any reason beyond its immediate 
execution, you could be looking at a problem because the D GC 
can't see C function memory and may free it after the function 
returns.


More information about the Digitalmars-d-learn mailing list