Skip to content

What is the relevance of this copy? #70

Answered by codingjoe
1r00t asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @1r00t,

Excellent question. This is to avoid state leakage. If you iterate over all sizes and don't create a copy before applying any changes to the object, the state will leak to the next iteration of the loop.

I believe this line was part of a bug fix from @vchrisb who discovered this issue.

Cheers,
Joe

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@1r00t
Comment options

Answer selected by 1r00t
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants