Giter Club home page Giter Club logo

Comments (4)

lfreist avatar lfreist commented on June 9, 2024

Hi @Six0Ne, thank you for reporting your concerns. I will evaluate your points.

Concerning your second point:
I am not a windows expert at all, so I may be wrong but calling hr = obj->Get(L" ", 0, &vt_prop, nullptr, nullptr) does not look like it is creating a vt_prop. We pass a memory address as argument and the function will use this address and overwrite existing data. We only need to free the address once, don't we? Or is obj->Get(...) allocating additional memory that is not freed on destruction?

from hwinfo.

Six0Ne avatar Six0Ne commented on June 9, 2024

Hello, I mean no harm; Regarding the second point, the theory is the same as what you said, we pass a memory address as a parameter, and the function will use that address and overwrite the existing data. We only need to release the address once; but in fact, doing so will indeed cause the memory to increase abnormally. As a simple test, put auto cpus = hwinfo::getAllCPUs(); into while(1) and run, we will find The memory of the program will grow abnormally;

from hwinfo.

lfreist avatar lfreist commented on June 9, 2024

Well, doesn't look that nice indeed ๐Ÿ˜…

Feel free to submit a pull request. Else, I will try to approach the issue in the next few days. Thanks for the report!

from hwinfo.

Six0Ne avatar Six0Ne commented on June 9, 2024

Okay, please update it.

from hwinfo.

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.