Giter VIP home page Giter VIP logo

Comments (8)

vadz avatar vadz commented on June 27, 2024

I wonder if it's wxTextAutoCompleteData being leaked...

The strange thing is that there doesn't seem to have been any changes in this area since 3.2, so I don't see how could this be fixed.

from wxwidgets.

PBfordev avatar PBfordev commented on June 27, 2024

I can't repro in 3.2.0 and 3.2.2.1 either, it starts manifesting in 3.2.3.

from wxwidgets.

vadz avatar vadz commented on June 27, 2024

If you could please bisect between 3.2.2 and 3.2.3 (there should be no problems due to submodule changes in this range), it would be great, TIA!

from wxwidgets.

PBfordev avatar PBfordev commented on June 27, 2024

This commit is the culprit: d666d1e

from wxwidgets.

vadz avatar vadz commented on June 27, 2024

Sorry, I don't understand: this commit is on master, do you mean that it fixed the leak? This still doesn't explain why it didn't exist in 3.2.0...

from wxwidgets.

PBfordev avatar PBfordev commented on June 27, 2024

Sorry, I posted the master version of the commit, it should have been: e19984e

from wxwidgets.

vadz avatar vadz commented on June 27, 2024

Thanks!

This probably means that it's just a false positive, i.e. I believe that the callback cleanup function is called to free this memory — but it happens after the MSVC CRT makes its report. To be totally sure, you could try running the sample under the debugger and put a breakpoint on wxThreadSpecificInfoTLS::DeleteThreadSpecificInfo(): it should be triggered for the thread created by Windows internally when the program exit but you should already see the leak reported in the debug output window by the time this happens.

Even if my hypothesis is correct, it's still not nice to get these leak reports, but I don't know what to do about them. Perhaps there is some way to tell the debug CRT to ignore this allocation?

from wxwidgets.

PBfordev avatar PBfordev commented on June 27, 2024

The breakpoint wxThreadSpecificInfoTLS::DeleteThreadSpecificInfo() is hit once (for the main thread), the memory leak report is shown in the MSVS debug output only after that.

However, the report looks like this

The thread 14792 has exited with code 0 (0x0).
The thread 13136 has exited with code 0 (0x0).
The thread 4828 has exited with code 0 (0x0).
The thread 13248 has exited with code 0 (0x0).
The thread 11168 has exited with code 0 (0x0).
Detected memory leaks!
Dumping objects ->
<snipped>
Object dump complete.
The program '[16348] widgets.exe' has exited with code 0 (0x0).

The main thread is not among the exited threads listed before the report. Perhaps the main thread is never listed and instead the process exit (with process id instead thread id) is used, shown only after the memory leak report.

Ad for preventing false positives, it seems there is _IGNORE_BLOCK but I have no idea how to properly use it or even if it should be used here...

from wxwidgets.

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.