Revert "Avoid possible memory leaks by ensuring stream closures"

This reverts commit eb460e21aa42f5e729d14e5ab25e04c31d9cc1eb.