<div dir="ltr">On 19 September 2013 02:14, Andrej Mitrovic <span dir="ltr"><<a href="mailto:andrej.mitrovich@gmail.com" target="_blank">andrej.mitrovich@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 9/18/13, Manu <<a href="mailto:turkeyman@gmail.com">turkeyman@gmail.com</a>> wrote:<br>
> And in D:<br>
><br>
>   struct Thing;<br>
>   extern (C) Thing* MakeThing();<br>
><br>
> The question is, does this suck?<br>
> D currently can't allocate an array of Thing*'s for some weird reason.<br>
<br>
</div>This is just a current bug that will be fixed. As a workaround you can use this:<br>
<br>
struct Thing<br>
{<br>
    @disable this();<br>
    @disable this(this);<br>
}<br>
<br>
This will ensure "Thing" will never be copied by value, and you can<br>
only use it with a pointer.<br>
</blockquote></div><br></div><div class="gmail_extra">But since I'm always dealing with a pointer rather than a real type, I can't implement logic to inc/dec the ref-count on assignment. And how do I handle destruction/garbage collection?</div>
</div>