This makes sure it is actually shut down and does not emit any signals anymore later, and also prevents a memory leak.