c# - Clearing a double-linked list -
I have a double-linked list (queue) I have made on my own. I'm thinking, to clear the linked list, is it enough to just remove the reference of the head and tail? example clear public zeros () {head = zero; Tel = faucet; } I am doing a domino imaging imaging, but I have been having a hard time testing it. This whole object will appear at least blank. All data requests (such as peek, deckies etc) return to zero. You can easily preview some new objects. It appears that it is functional properly. But I really want to know if I am doing it correctly. The easiest way to test is to compose some logging output to finalize your linked list node object. Note that you can not be sure that the garbage collector when (compile it without compelling it through GC) ) So you have to The last device to be called will not be visible, as you explain () method. ">