[PATCH] kmail leaking KPopupMenus

André Wöbbeking Woebbeking at onlinehome.de
Tue Dec 30 11:02:34 GMT 2003


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

On Tuesday 30 December 2003 11:48, Rolf Magnus wrote:
> Attached is a patch for a small leak in KMail. Whenever you drag/drop
> a mail into a mail folder, a new KPopupMenu for selection between
> copy and move is created, but not destroyed. This patch creates the
> menu once and reuses it.

why not creating the menu on the stack, i.e. 

KPopupMenu menu( this );
menu.insertItem( i18n("&Move Here"), DRAG_MOVE, 0 );
...
int id = menu.exec( QCursor::pos(), 0 );


André
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQE/8VtQGcp/AjG8ndYRArviAJ9EhxUtjUMF2DwkVw9p447ljqc1/ACePQOg
ZY2uHNOclYTZFQ5HWQgrTbY=
=VER0
-----END PGP SIGNATURE-----




More information about the kde-core-devel mailing list