[Mono-dev] LinkedList.Clear - Bug #311

Todd Foster todd.foster at logos.com
Wed Aug 17 14:57:45 EDT 2011


I ran into a discrepancy between mono & .net in how they implement LinkedList.Clear. While mono just drops the list nodes on the floor, .net seems to detach each one, clearing their Previous and Next fields. I have a case where someone kept references to the nodes in order to clear a list and add them back in a different order. When AddLast checks to see if the node already belongs to a list, it does and so the add fails.

I filed a bug (#311) and also submitted a pull request with a possible patch. Could someone please look this over for me?

Thanks,

--Todd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20110817/1375ad0f/attachment.html 


More information about the Mono-devel-list mailing list