[Kde-bindings] QtRuby memleak continued

Caleb Tennis caleb at aei-tech.com
Fri Sep 1 11:45:23 UTC 2006


> I think the QtRuby code for QStrings is probably wrong, but for 'char *'s
> I'm
> not sure as there are no rules for who 'owns' the string after the call
> has
> completed. Perhaps we can usually assume QtRuby should delete the 'char
> *',
> but special case when it shouldn't - tricky..

What scares me the most about marshall_charP (talking QtRuby 3 here) is
that new charPs are created with "malloc" in the FromVALUE and deleted
with "delete[]" in the ToVALUE.  However, since I'm not seeing any
warnings from valgrind on this, and some qDebugs thrown in the code seem
to indicate that the charP's that are getting created on my system aren't
being cleaned up at all.

Caleb






More information about the Kde-bindings mailing list