Interfacing with XPCOM
Jason House
jason.james.house at gmail.com
Sat Dec 6 16:28:07 PST 2008
Sergey Gromov wrote:
> But what's the typical use case for extern(C++) objects ? I think it's
> something like this:
>
> extern(C++) class CppInterfaceClass { ... }
>
> extern(C++) CppInterfaceClass create()
> {
> return new CppInterfaceClass(...);
> }
>
> extern(C++) void destroy(CppInterfaceClass obj)
> {
> delete obj;
> }
while extern(C++) will accept that code, but it won't work right.
More information about the Digitalmars-d
mailing list