On Saturday, 23 April 2016 at 01:11:49 UTC, Ramon wrote:
mmm, I figured the problem, but don't know how to solve it.
my struct has a destructor which clears itself:

struct json_value
{
  ~this() { .ValueClear(&data); }
}

so how I can I put a struct in the heap? (not in the stack, as is the default..)

new or make with arg or new or make then opAssign or this(this).

but have you tried

    __ghsared immutable json_value cbk = json_value(prms.argv[3]);

? without __gshared cbk might be on the TLS. (see with -vtls switch on DMD)

Reply via email to