We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e8a5e07 commit fcf170dCopy full SHA for fcf170d
1 file changed
src/queue.ts
@@ -55,6 +55,10 @@ export class Queue<T> {
55
}
56
57
clear() {
58
+ for (let i = 0; i < this._size; i++) {
59
+ this.buffer[(this.head + i) % this._size] = undefined
60
+ }
61
+
62
this.head = 0
63
this.tail = 0
64
this._size = 0
0 commit comments