I\'m confused as to when I should be deallocating the following object from memory:
struct ListNode { int val; ListNode *next; ListNode(int x) : v