downloadToFile

How does calling the destructor of this ‘cancel the download task if necessary’ as it says in the manual?

The destructor is empty and the class doesn’t seem to contain any other code that’ll be executed if I delete it…?

It inherits a class that has a destructor that does something? There’s an object member variable that has a destructor that does something?

I couldn’t see any of those…! I might be being dumb.

In most implementations dowloadToFile() returns a FallbackDownloadTask, which derives from DownloadTask and has stream->cancel(); in its destructor.

1 Like

Ah - thanks, that’s it. Makes sense now.