[Qt-interest] Delete QObjects which are moved to different thread
Giuseppe D'Angelo
dangelog at gmail.com
Wed Oct 26 09:34:14 CEST 2011
On 26 October 2011 09:27, Wilhelm <wilhelm.meier at fh-kl.de> wrote:
> Hi,
>
> if I move a QObject to a different QThread and then destroy this object
> deferred, the dtor is called by this thread, if it is running: ok.
>
> But if the other thread is not running, I can't use deferred deletion
> since there is no running event loop.
> Trying to delete the object from the main thread via delete operator,
> the dtor ist called from a different thread than the main thread: I
> assume the QObject-dtor detects that the object belongs to a different
> thread and if that is not running it starts a new thread to execute the
> dtor. Right?
Wrong.
--
Giuseppe D'Angelo
More information about the Qt-interest-old
mailing list