“An abrupt exit”, more commonly known as a “crash”.
If you’re going to argue that an exit through panic!()
is not a crash, I will argue that your definition of a crash is just an abrupt exit initiated by the OS. In other words, there’s no meaningful distinction as the result is the same.
That’s fair, although technically you could catch SIGSEGV and release resources that way too.
Also, given that resources will be reclaimed by the OS regardless of which kind of crash we’re talking about, the effective difference is usually (but not always) negligible.
Either way, no user would consider a
panic!()
to be not a crash because destructors ran. And most developers don’t either.