Double object deletion in KHTMLPart dtor

Andras Mantia amantia at freemail.hu
Wed Dec 10 13:58:39 GMT 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

David Faure wrote:

> On Tuesday 09 December 2003 17:14, Andras Mantia wrote:
>> I'm not a valgrind guru, so I didn't know about that. Here is the new
>> result (as you seen not all of the kdelibs is compiled with debug info,
>> but it should be traceable). Looks like the KFind object is already
>> deleted when the KHTMLView is destroyed.
> No, when the part is destroyed.
> 
> You're deleting the widget (view) before the part, which should be fine.
Hm, right, only that I'm not the one who explicitely does it, but right, it 
gets deleted because the view is added to a widget stack which belongs to the 
main window.

> 
>> Is widget() here a KHTMLView?
> Yes.
> And when deleting the view before the part, ~QObject (for the view)
> deletes the kfind object before khtmlpart deletes it -> double deletion.
> 
> Solution (untested):
Tested, works. Should I commit?

Andras

- -- 
Quanta Plus developer - http://quanta.sourceforge.net
K Desktop Environment - http://www.kde.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)

iD8DBQE/1yaPTQdfac6L/08RAqltAJ9rPel6YMGyf8PRUQwkawtScuiR2wCggF32
ZdI5I++Gs4UnlCbWvJhfX9Y=
=jRvw
-----END PGP SIGNATURE-----




More information about the kfm-devel mailing list