A distinction: when you say "random containers", many of us wonder if you mean containers you find in random encounters, though we all know you more likely mean static containers in towns (containers that are always in the same place in public locations).
If you leave items in containers you find in random encounters, they get deleted the moment the last player exits that map. It was a temporary map, thus a temporary container, in a "random encounter".
If you leave items in static containers you find in public locations, it is not deleted when you leave. It's there until someone checks that container, finds your item, and likely takes it for himself assuming "oh look! someone left me a nice gift here."