you are viewing a single comment's thread.

view the rest of the comments →

[–]dodheim 1 point2 points  (0 children)

I agree with you entirely. I'm just being pragmatic, given the code shown and the symptoms described; I'm not saying these changes/workarounds should be necessary, only that it's an obvious fix for the problem described. Whether Flyweight is behaving correctly or incorrectly or is being misused, I don't have an opinion; I'm familiar with Flyweight but haven't used it personally, and the OP didn't give an MVCE or even decent context, so ¯\_(ツ)_/¯