Giter Club home page Giter Club logo

Comments (8)

lolzballs avatar lolzballs commented on August 21, 2024

On further inspection, various widgets in AddGameWizard need parents as well.

from client.

elken avatar elken commented on August 21, 2024

Noted, will amend in the refactor inbound. Muchas gracias, senor.

from client.

JimViebke avatar JimViebke commented on August 21, 2024

Just curious about design decisions, why aren't managed pointers such as unique_ptr<T> and shared_ptr<T> being used? I don't see the reason behind using raw pointers in 2015 unless one is working with legacy code. In terms of performance, compilers can optimize unique_ptrs to the same machine code as raw pointers.

If it's just a matter of somebody doing it, let me know.

from client.

elken avatar elken commented on August 21, 2024

Because there's no need for ownership or sharing and the objects won't outlive the parent. Not relevant to the issue.

Sent from my Android device with K-9 Mail. Please excuse my brevity.

from client.

Hal9007 avatar Hal9007 commented on August 21, 2024

To elaborate on the response by @elken above, Qt by nature favors heap-allocation of local QObjects for a number of reasons, opting to manage memory hierarchically throughout the application when respective QObjects are parented to one another. In this issue, some parents were never set, hence the memory leakage.

The sheer amount of QObjects we're initializing programmatically now and in the future favors raw pointers as a form of brevity, though yes, in any other case we would be doing otherwise.

from client.

elken avatar elken commented on August 21, 2024

To further elaborate, we also want raw pointers as arguments and as local variables for the speed and leanness of just an address, we don't need the overhead *_ptr types provide.

from client.

elken avatar elken commented on August 21, 2024

Issue seems to be resolved, reopen if not.

from client.

lolzballs avatar lolzballs commented on August 21, 2024

The memory leak still occurs on both wizards: http://i.imgur.com/Jd5Ztm0.gifv

from client.

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.