All streams are closed when their object is destroyed. Typically this happens when they go out of scope.