bupticybee / TexasSolver

🚀 A very efficient Texas Holdem GTO solver :spades::hearts::clubs::diamonds:
https://bupticybee.github.io/texassolver_page
GNU Affero General Public License v3.0
1.73k stars 306 forks source link

Memory Leak console app #131

Open nbiresev opened 2 years ago

nbiresev commented 2 years ago

I have adjusted console.cpp to use CommandLineTool via std in and write output via dump_result_to_stdout. The issue is that it creates memory leak. Each time the solution is solved, the RAM usage increases and once it starts solving new solution it keeps increasing. I compared to GUI version, after i click solve button it frees the RAM that was previously used by solver. Can you please give me a hint, which part of code is using RAM which i need to delete before solving new solution?

bupticybee commented 1 year ago

I have adjusted console.cpp to use CommandLineTool via std in and write output via dump_result_to_stdout. The issue is that it creates memory leak. Each time the solution is solved, the RAM usage increases and once it starts solving new solution it keeps increasing. I compared to GUI version, after i click solve button it frees the RAM that was previously used by solver. Can you please give me a hint, which part of code is using RAM which i need to delete before solving new solution?

Not really sure what happened, I stopped optimize console version a long time ago.