That is the idea of the oubliette.
Comes from the French verb oublier, to forget.
The hapless prisoner is thrown in, probably breaking something in the process, the door is closed and they forget about him.
Until they want to use it for another prisoner, when they clear out the bones to make it nice and clean for the next tenant.