BUG: The System.Collections.Queue.Clone method loses data while cloning objects (829445)
The information in this article applies to:
- Microsoft .NET Framework 1.1
- Microsoft .NET Framework 1.0
- Microsoft Visual C# .NET (2003)
- Microsoft Visual C# .NET (2002)
- Microsoft Visual C++ .NET (2003)
- Microsoft Visual C++ .NET (2002)
- Microsoft Visual Basic .NET (2003)
- Microsoft Visual Basic .NET (2002)
SYMPTOMSThe Queue class is a Microsoft .NET Framework Class Library class. It
represents a first-in, first-out collection of objects. However, if you use the
Queue.Clone method to clone a queue, and if the call to the Queue.Dequeue method is made before the call to Queue.Clone method is made, the data is lost.CAUSEA bounded buffer is used to implement the Queue class. The Clone method uses the beginning of the buffer, instead of the head
pointer, as the starting point. When the Dequeue method is called, the first element is removed. However, the
beginning of the buffer remains the same. Therefore, the first element appears
as an empty element and the last element is lost in the cloning
process.STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed in the "Applies to" section.
Modification Type: | Minor | Last Reviewed: | 2/4/2006 |
---|
Keywords: | kbvs2005swept kbvs2005doesnotapply kbvs2002sp1sweep kbpending kbCollections kbbug KB829445 kbAudDeveloper |
---|
|