On Friday 21 October 2005 22:29, Michael Pyne wrote:
> On Friday 21 October 2005 11:42, Ivor Hewitt wrote:
> > On Wednesday 19 October 2005 16:43, Jimmy Gilles wrote:
> > > It works very well but my problem is that when "list" is deleted, keys
> > > that are in this list are not deleted. Why ?
> > > I use QPointer to automaticaly delete keys but it doesn't work.

> >
> > Destroying a QPointer does not destroy the object it points to.

>
> And for a perhaps more useful answer, add a destructor for KgpgListKeys
> that iterates over its keys and deletes them. You might not be able to use
> foreach() since the dtor will be iterating over itself but something like
> this would work:
>

Hi Michael,
Indeed, except I was assuming he had a pretty good idea what he was doing, and
would be capable of writing an iterator himself, but had simply assumed that
QPointer was an autopointer.
(ok, actually my conscience insists that I confess to accidentally hitting
ctrl-enter after typing that line and then deciding there wasn't much point
following up.)

Cheers,

--
Ivor Hewitt.

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<