It used to be that a single tech support call cost us any profit from 3 copies of the product.
Things are different now though - the frameworks on platforms have orders of magnitude more surface and complexity. And most small companies don’t offer 1-1 support anymore.
Swift helps a lot. It has a lot of safety in it. I haven’t had a memory leak in ages.
Also, Xcode has gotten really good at letting me know when I have a future crash.
So “unsafe” is relative.
In any case, memory leaks are sloppy, and I have a personal aversion to writing sloppy code.
But it's still a bad look, and Apple won't approve an app, if they can get it to crash -regardless of the reason.
1. Crashes aren’t unsafe. They’re actually preferable for both Swift and rust than getting into an unsafe state with incorrect data. So in that sense, crashes are the seen as safe, just undesirable as an outcome.
2. Memory leaks can’t be unsafe any more than a badly optimized algorithm.
But yes, they’re sloppy and should be avoided. I just contend that there’s no real case where I think they should be considered unsafe from the model of a programming language.
They might be unsafe from the model of a context specific use. E.g you wouldn’t want a memory leak locking up your system in vehicular automation. But I’d fall back to it just being sloppy programming if that state is achieved.