java plugin in nspluginviewer
David Faure
david at mandrakesoft.com
Mon Oct 21 08:52:41 BST 2002
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Monday 21 October 2002 00:05, Till Krech wrote:
> 5) I found a (in my eyes) weird problem. Look at this (kdebase/nsplugins):
> In nsplugin.h:
> class NSPluginStreamBase : public QObject
> {
> Q_OBJECT
> ...
> private:
> -----> QByteArray _queue;
> ...
> }
>
> and in nsplugin.cpp:
> NSPluginStreamBase::~NSPluginStreamBase()
> {
> if (_stream) {
> _instance->NPDestroyStream( _stream, NPRES_USER_BREAK );
> delete _stream;
> }
>
> delete _tempFile;
> -----> delete _queue;
> }
>
> _queue is not a pointer. What happens upon delete ?
_queue is casted to a char*, since QMemArray<char> provides such a conversion operator.
Of course using _queue.data() would be far far cleaner and easier to understand.
> Isn't _queue deleted automatically when NSPluginStreamBase is deleted?
The QByteArray is. Its content, not, if setRawData was used.
You need to check how the memory management of the contents of _queue is done.
- --
David FAURE, david at mandrakesoft.com, faure at kde.org
http://people.mandrakesoft.com/~david/
Contributing to: http://www.konqueror.org/, http://www.koffice.org/
Get the latest KOffice - http://download.kde.org/stable/koffice-1.2/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
iD8DBQE9s7JJ72KcVAmwbhARAuS5AKCuttyLE4Po+n1RiP/yGNDpOXa+cwCeIK/k
2JtkGAp1OasQ0Rl56hb93L0=
=avU5
-----END PGP SIGNATURE-----
More information about the kfm-devel
mailing list