I know this would be a correct way to use a StreamWriter:

```
using (StreamWriter sw = new StreamWriter(hreq.GetRequestStream()))
    sw.Write(jsonPostData);

```

But what about this? Is this also valid or to be avoided? Would it be properly disposed?

```
new StreamWriter(hreq.GetRequestStream()).Write(jsonPostData);

```