That's true. But contracts here usually have a set termination time, with a minimum notice time typically required by law, dependent on how long you've been hired at the company.
Tends to be one month for below a year, three months beyond a year.
As in after a termination there's a period during which you're still supposed to work and collect the salary.
Exceptions are B2B contracts (but they still often have one of those) and some piece work contracts.
Of course a particular bastard of a company can still immediately cut you off everything but the salary including the doors.