GithubHelp home page GithubHelp logo

Comments (9)

SilverBut avatar SilverBut commented on June 15, 2024 1

Seems a possible solution: https://stackoverflow.com/questions/15674422/unable-to-detect-why-qdialog-is-memory-leaking

from idarling.

NyaMisty avatar NyaMisty commented on June 15, 2024 1

I'm not mean to be offensive, but I wonder why we need to care about things like this?
IDArling and IDA aren't used in a large-scale or long-time running scenario, and memory leak for about several KB or MB or even ~10MB each time opening the settings window is quite acceptable, as no one will repeatedly open and close it.
I think we should focus on other main issues instead of this tiny mysterious memory leak

from idarling.

NyaMisty avatar NyaMisty commented on June 15, 2024 1

But I also suggest that we solve this issue when we already have a pre-release

from idarling.

SilverBut avatar SilverBut commented on June 15, 2024

Seems a possible solution: https://stackoverflow.com/questions/15674422/unable-to-detect-why-qdialog-is-memory-leaking

Nope. Not the source. But fixed:

         def settingsActionTriggered():
-            SettingsDialog(self._plugin).exec_()
+            if self._settingsDialog == None:
+                self._settingsDialog = SettingsDialog(self._plugin)
+            self._settingsDialog.exec_()

from idarling.

NeatMonster avatar NeatMonster commented on June 15, 2024

How did you confirm the memory leak? I read the documentation of QDialog::done and it appears to me that setting the Qt::WA_DeleteOnClose flag would be enough. Am I missing something?

from idarling.

SilverBut avatar SilverBut commented on June 15, 2024

How did you confirm the memory leak? I read the documentation of QDialog::done and it appears to me that setting the Qt::WA_DeleteOnClose flag would be enough. Am I missing something?

Open & close the settings menu using a script and monitor the memory usage ;)

from idarling.

NeatMonster avatar NeatMonster commented on June 15, 2024

Sorry for the late reply @SilverBut. I've tested your pull request #52 but I'm still seeing a memory leak. Even if the dialog is reused, memory usage increases every time I open and close it. In all of my testing, the singleton method appears to be equivalent to using Qt::WA_DeleteOnClose.

from idarling.

SilverBut avatar SilverBut commented on June 15, 2024

Strange. The commit 2714069 should not create any more setting dialogues and its pages. Maybe it is not the dialog which is created for many times.
I may check it later. Kind of busy recently.

from idarling.

patateqbool avatar patateqbool commented on June 15, 2024

totally agree, just keep it in a corner of our head for when there will be no more issue :)).

from idarling.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.