They are very different. In the first case you create a Node
on the heap and then straight away "forget" it, causing a memory leak. The second case doesn't create a Node
and so no leak.
If you really see the first version everywhere in your code, I'd be pretty worried!