[Kde-bindings] KDE/kdebindings/qtruby
Richard Dale
Richard_Dale at tipitina.demon.co.uk
Mon Jul 17 19:36:08 UTC 2006
SVN commit 563528 by rdale:
* Some QtRuby QHash based caches were defined with QStrings, and when the value
was accessed the QString was converted to a QByteArray via toLatin1() and then
to a 'char *'. However, the 'char *' only lasted as long as the QByteArray,
and this caused memory corruption if the 'char *' was still in use after the
QByteArray was freed. So the QHash's are now defined like this:
QHash<QByteArray, Smoke::Index *> methcache;
QHash<QByteArray, Smoke::Index *> classcache;
QHash<int, QByteArray> classname;
This doesn't completely fix a crash in QtRuby though, although it does seem to
improve things. Thanks to Charlton Wang for tracking down where the string was
being corrupted.
CCMAIL: kde-bindings at kde.org
CCMAIL: charlton at cs.utoronto.ca
M +16 -0 ChangeLog
M +61 -80 rubylib/qtruby/Qt.cpp
M +1 -1 rubylib/qtruby/handlers.cpp
More information about the Kde-bindings
mailing list