"Bread, water, and a Bible is all y'get, lad."
Discipline in the Royal Navy, even in 1939 when HMS Belfast was commissioned, was legendary. Belfast's brig couldn't hold too many men. They were fed only bread and water, and only had a Bible to pass the time.
A jailer would be detailed in a wartime area to make sure the men were released in the event of sinking. I don't know of any circumstances where the jailer was killed in combat and the men left in the brig to drown, but that would be my first question if I'm ever drafted into any Navy.