Qt bindings for D

Jacob Carlborg doob at me.com
Tue Oct 15 23:53:24 PDT 2013


On 2013-10-15 17:55, w0rp wrote:

> This is a really interersting point, and the part of desiging the API I
> found the most difficult. How do you write an interface for Qt in D that
> is both polymorphic and avoids memory management problems? For instance,
> in PyQt and PySide, you can have objects vanish because you didn't keep
> a reference to them, even though some other part of Qt itself might own
> a reference to the object.
>
> I couldn't think of a way to do it myself which was elegant.

In D, using the GC, you can call GC.addRoot to avoid that problem.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list