KDE/kdebase/workspace/plasma/applets/systemtray/protocols/fdo

Aaron J. Seigo aseigo at kde.org
Thu May 28 18:08:49 CEST 2009


On Thursday 28 May 2009, Casper Clemence wrote:
> hmmm... there must be a design pattern that achieves this elegantly
> with no extra overhead... maybe

Pixmap bg = XCreatePixmap(display, clientWinId(), width(), height(), d-
>attr.depth);
XPixmapJanitor janitor(bg);


XPixmapJanitor would do the necessary clean up in its dtor. whenever the 
method returns, janitor will fall out of scope, it's dtor will get run, the 
pixap will be freed.

common pattern.

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Qt Software

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/plasma-devel/attachments/20090528/239b2292/attachment.sig 


More information about the Plasma-devel mailing list