That is what I meant. And having a garbage collector run could potentially freeze the JVM, causing a performance hit. (I mean, it is basically a global lock on the entire system, right?)
Basically, my reading of "safe" meant "would not block." A garbage collection cycle stops everything, so is effectively a block, right?
I read "safe" differently than you did; now I'm on the same page. With or without a GC, if you want to guarantee safety in that sense no matter what, you're right - you just can't allocate memory. So in the worst case running in a managed environment doesn't buy you much, but often the guarantees you need are a bit looser than that, and in that case managed memory can be really beneficial.
Basically, my reading of "safe" meant "would not block." A garbage collection cycle stops everything, so is effectively a block, right?