meganz / sdk

MEGA C++ SDK
BSD 2-Clause "Simplified" License
1.33k stars 504 forks source link

Freeing MegaApi class instance takes a long time and 100% CPU #2586

Closed superflexible closed 2 years ago

superflexible commented 2 years ago

Hello, it seems that a simple delete myMegaAPI; takes a long time to free the nodes, is there any way to speed this up? Can I clear the nodes list prior to deleting the class instance?

superflexible commented 2 years ago

Apparently it's due to the C++ library's iterator debugging features, because I am using the DEBUG build. Will try switching to RELEASE.

mattw-mega commented 2 years ago

Yes it is (in the VS c++ lib) - release will run fast, or you can turn that off with the x64-windows-mega-staticdev triplet (you have to rebuild 3rd party libraries too)

superflexible commented 2 years ago

Hi, yes release is much faster, thanks.