WinRT

Jacob Carlborg doob at me.com
Sun Oct 2 01:27:41 PDT 2011


On 2011-10-01 23:44, Michel Fortin wrote:
> On 2011-09-30 14:05:28 +0000, Jacob Carlborg <doob at me.com> said:
>
>> On 2011-09-30 12:58, Michel Fortin wrote:
>>> On 2011-09-29 21:23:48 +0000, RenatoL <renato at relhost.net> said:
>>>
>>>> Hi all. What do you about WinRT? I think this new APIs could be a
>>>> very interesting point for D... they are open to any language and
>>>> i think that D is perfect to work with them. What's your opinion?
>>>> Best regards
>>>
>>> From what I understand, WinRT is based on COM. D already supports COM,
>>> so it might already be doable by declaring the right interfaces as
>>> derivatives of IUnknown.
>>>
>>> I suggest you give it a try.
>>>
>>> That said, the automatic reference counting they added to WinRT types in
>>> Visual C++ won't be available without compiler support (but you can do
>>> it manually), and neither will the compiler-generated reflection data
>>> (you'll have to generate it yourself).
>>
>> Doesn't the garbage collector implement reference counting or similar
>> when implementing from IUnknown?
>
> Would be great, but it's not mentioned in the language spec so I
> somewhat doubt it.
> <http://www.d-programming-language.org/interface.html#COM-Interfaces>
>

Perhpas I was thinking about this: 
https://github.com/D-Programming-Language/druntime/blob/master/src/rt/lifetime.d#L103 
(the comment)

But that might not be automatically called.

-- 
/Jacob Carlborg


More information about the Digitalmars-d-learn mailing list