Practice
Learn
← Quit
0 / 0 correct
Rust
Hard
1 of 40
Why does reusing a buffer with buf.clear() in a loop help performance?
A
It zeroes memory faster
B
clear() keeps the allocated capacity, so later pushes don't allocate again
C
clear() frees the memory
D
It makes the buffer static