MEONMedical / Log4Qt

Log4Qt - Logging for the Qt cross-platform application framework
Apache License 2.0
589 stars 235 forks source link

release version log4qt Memory leak(OS:Windows) #60

Closed wslj2016 closed 2 years ago

wslj2016 commented 3 years ago

The released project occupies more memory with the increase of logs,and not released. The more debug or error log info taked ,the more memory will be occupied, but there is no phenomenon in the debug version.

wslj2016 commented 3 years ago

I just tried it under ubuntu, and the files generated by release and debug have no memory leaks.

wslj2016 commented 3 years ago
  1. OS:Windows
  2. Qt 5.12.7 MinGW 32-bit

while(true) { LBP_QtLog::Instance()->logger()->debug(QStringLiteral("TestPolling")); LBP_QtLog::Instance()->logger()->debug(QStringLiteral("TestPolling")); }

wslj2016 commented 3 years ago

anyone help

andibacher commented 3 years ago

How did you notice this ? TaskManager? I tried to reproduce this on Windows in Release Mode (also in Debug). And I can not notice any memory increase over the time. I modified the basis example so that it does continuous logging.

Do you have more information under which conditions this happens?

wslj2016 commented 3 years ago

Thank you for your repay,I just notice that with TaskManager. I also tried the version of the official website(https://sourceforge.net/projects/log4qt/files/),which also has this phenomenon(memory leak only in the release mode of windows OS).

andibacher commented 2 years ago

Sorry I don't see this here an Windows and release mode, even if the modified basic example does continuous logging over some hours. I don't see were a memory leak in log4qt should happen.

We use log4qt in several projects on windows and we never have notice an significant memory increase over time.

andibacher commented 2 years ago

I close this issue because I can not reproduce this.

We use log4qt in several projects on windows and we never have notice an significant memory increase over time.

yangyongzhen commented 2 years ago

i have the same probloems,The more debug or error log info taked ,the more memory will be occupied in windows. i have the examples used by qt project, you can try int image