On Sun, May 30, 2021 at 2:05 PM Giuseppe D'Angelo via Development <
[email protected]> wrote:

> I'd tend to agree with idea, but not with the specific solution. You may
> want
>
> 1) to keep the cache alive across multiple QGA::exec() invocations,
> 2) to destroy it only when QGA gets destroyed,
> 3) to recreate it if QGA itself gets recreated.
>

Fair enough. If the object doesn't expect QGA to be alive while cleaning
up, then we could probably simply attach a destruction callback
(qAddPostRoutine)?


> A very simple solution is to make the cache a member of QGA(P), create
> it lazily if needed (like Q_G_S does; but I've got the funny feeling
> that the pixmap cache is used in 100% Qt apps, so maybe that's not even
> needed), and kill it in ~QGA.
>

That should work, but it'd be one of them "exceptions", wouldn't it ...? ;)
_______________________________________________
Development mailing list
[email protected]
https://lists.qt-project.org/listinfo/development

Reply via email to