[rust_port] Possible: Closures not dying
I think there's a memory leak when searching , basically some closures keep running , for example
ERROR rustio::client > Search ID changed -> cancel this search loop. (This: 1 <-> Current: 2) ERROR rustio::client > Search ID changed -> cancel this search loop. (This: 2 <-> Current: 3) ERROR rustio::client > Search ID changed -> cancel this search loop. (This: 3 <-> Current: 4) ERROR rustio::client > Search ID changed -> cancel this search loop. (This: 4 <-> Current: 5) ERROR rustio::client > Search ID changed -> cancel this search loop. (This: 6 <-> Current: 7) ERROR rustio::client > Search ID changed -> cancel this search loop. (This: 7 <-> Current: 8) ERROR rustio::client > Search ID changed -> cancel this search loop. (This: 8 <-> Current: 9) ERROR rustio::client > Search ID changed -> cancel this search loop. (This: 10 <-> Current: 11) ERROR rustio::client > Search ID changed -> cancel this search loop. (This: 11 <-> Current: 12) ERROR rustio::client > Search ID changed -> cancel this search loop. (This: 12 <-> Current: 13) ERROR rustio::client > Search ID changed -> cancel this search loop. (This: 13 <-> Current: 14) ERROR rustio::client > Search ID changed -> cancel this search loop. (This: 15 <-> Current: 16)
It can jump more like here
ERROR rustio::client > Search ID changed -> cancel this search loop. (This: 11 <-> Current: 12)
ERROR rustio::client > Search ID changed -> cancel this search loop. (This: 19 <-> Current: 20)
(I changed debug to error for convenience)
some loops aren't mentioned here for example 5,9,14 on the first example and 7 ones in the second example and memory keeps increasing each time I search a new thing , It starts close to 20mb than keeps increasing ,for example I reached 100mb quickly.
Not sure if I'm missing something