Qt "about the jump page after the current page (delegate delegate) data loss problem"

Source: Internet
Author: User

This is a very low-level error, before the PO main rush to complete the task, but also did not pay attention to see, window jumping windows as shown:

This process is all the click and B*pb,pb->show, and the same a*pa,pa->show, there is a memory leak in the process, because the window is constantly new and then show,

Even if there is data, but new window, the old no, that the old data does not exist in the new window, because the embedded Development Board memory is not very large, if used for a long time,

This algorithm is definitely fried, is 5 minutes before and after memory use comparison:

5 minutes ago:

After 5 minutes:

The Board memory itself is not very large, such as 1G, five minutes to eat 100MB, for the moment not to say a word lost "even if you save the text and then read to solve the" in less than one hours, the machine because

The memory is exhausted and freezes, which affects the user experience.

Workaround:

Instead of new pointers, you have the flexibility to use show and hide, and in the destructor, the pointer to the previous window exists, there is a delete, to prevent memory leaks, initialize null.

So this need to pay more attention, not because of first aid forget these important things, although PO master often forget things. .......

Technology lies in communication, experience is sharing ... Come from a shallow stream.

Qt "about the jump page after the current page (delegate delegate) data loss problem"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.