On 11/29/2013 08:58 AM, Adam D. Ruppe wrote:

> In this specific case, you can force a collection at the end of main()
>
>
> void main() {
>      auto b = new B;
>      a = new A;
>
>      import core.memory;
>      GC.collect();
> }

Note that the OP requires the unusualy destruction order: b first.

In any case, these objects can be destroyed without destroy anyway.

    mixin("dest" ~ /* :p */ "roy(a);");

Ali

Reply via email to