There's a `autoDelete` option for a task, but it's up to the
task to implement how it will delete itself. For SearchHistoryTask
this never happened.
I tested holding the `search` button for around one minute and the
memory was slowly growing and never freed. Adding a destructor with a
debug to remove any doubt made me realize: The search task was only
removed when konsole closed.
This is not just about the Memory Management, as the search was also
connected to multiple objects and could potentially mishandle searches.
Summary:
Those three classes where *used* inside of the SessionController
but they where not supposed to be there. The code in the
SessionController is already too big to understand, so the removal
of unrelated code is a good thing: it's now easier to reason
about those other three classes without having to deal with
the whole code that the SessionController has.
Reviewers: #konsole, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D17485