[Kde-bindings] playground/bindings/kimono

Richard Dale rdale at foton.es
Thu Feb 8 17:29:48 UTC 2007


On Thursday 08 February 2007, Arno Rehn wrote:
> Am Donnerstag, 8. Februar 2007 schrieb Richard Dale:
> > SVN commit 631534 by rdale:
> >
> > * Added a strongReferenceMap to hold a mapping from a C++ pointer to
> >   a C# instance. It is used to prevent garbage collection for instances
> >   which are contained in another instance, such as a QObject with a
> >   parent, even when there are no references to the child within the C#
> >   Qyoto application code. When the parent finally deletes the child on
> >   the C++ side, the reference is removed from the Dictionary by the
> >   SmokeMarshallers.UnmapPointer() method.
>
> Ah very good. I just recognized what I wrote before was complete rubbish,
> so this is definitly the right way.
Well I hadn't done much experimenting to comment - creating a GCHandle would 
mean it would contain a strong reference, but there's no need as it's easier 
to do it inside the managed code. I'm playing with the strongReferenceMap 
now, and the t1 hello world no longer works. So I think it will take a bit of 
time to get it working properly, especially if we need to trap all the method 
calls affecting strong references like Phil Thompson has suggested.

-- Richard




More information about the Kde-bindings mailing list