[Qt-interest] about QFuture distruction

Mihail Naydenov mlists at ymail.com
Fri Aug 28 15:34:37 CEST 2009


(sorry for the prev. mail :( )

I wanted to know the best practice about using QFuture, and especially its destruction.

The docs say QFuture dtor will not stop/wait for the thread. 
My question is, if I have a QFuture as member in class, is it the right way to do things, if I waitForFinished in this class dtor?
Otherwise if QFuture holds data as its result this data will never be destroyed because it (the data) will not exist if the QFuture is destroyed (as part of the class that holds it destructor) before it (the QFuture) has finished.
Am I right, should I *aways* wait in the dtor for a member QFuture?

Thank you and sorry again for the previous mail (ctrl+enter in yahoo mail ...)
MihailNaydenov



      



More information about the Qt-interest-old mailing list