Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. QQuickview Memory Clear Issue
Forum Updated to NodeBB v4.3 + New Features

QQuickview Memory Clear Issue

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
3 Posts 2 Posters 842 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Arvindhan PonnusamyA Offline
    Arvindhan PonnusamyA Offline
    Arvindhan Ponnusamy
    wrote on last edited by
    #1

    Hi ,
    I have created a QQuickview to display a popup like below.

    QQuickView* poQQuickView= new QQuickView();
    poQQuickView->setColor(QColor(Qt::transparent));
    poQQuickView->setMainQmlFile("MainQMLFile");
    poQQuickView->setFlags(Qt::FramelessWindowHint);
    poQQuickView->show();

    Memory is allocated only after requesting show().
    Now i want to release memory without deleting the poQQuickView object.
    Using below methods doesnt free the memory completely .
    poQQuickView->hide();
    poQQuickView->releaseResources();
    poQQuickView->destroy();

    Is there any method available in qt to clear the memory completely without deletelater()???
    Please support thanks.
    Regards,
    Arvi- QtBegin

    J.HilkJ 1 Reply Last reply
    0
    • Arvindhan PonnusamyA Arvindhan Ponnusamy

      Hi ,
      I have created a QQuickview to display a popup like below.

      QQuickView* poQQuickView= new QQuickView();
      poQQuickView->setColor(QColor(Qt::transparent));
      poQQuickView->setMainQmlFile("MainQMLFile");
      poQQuickView->setFlags(Qt::FramelessWindowHint);
      poQQuickView->show();

      Memory is allocated only after requesting show().
      Now i want to release memory without deleting the poQQuickView object.
      Using below methods doesnt free the memory completely .
      poQQuickView->hide();
      poQQuickView->releaseResources();
      poQQuickView->destroy();

      Is there any method available in qt to clear the memory completely without deletelater()???
      Please support thanks.
      Regards,
      Arvi- QtBegin

      J.HilkJ Offline
      J.HilkJ Offline
      J.Hilk
      Moderators
      wrote on last edited by
      #2

      @Arvindhan-Ponnusamy

      technically there's also

      delete poQQuickView;

      But what is your thought process behind this?
      If you free memory, that RAM entry isn't really deleted as in overwritten with 0, but its just markt as "use this as you see fit" for ANY other program in your OS.

      So you cant expect to grap that memory later on and simply use it again as if nothing happend. Its 100% sure to be, at least partially, overwritten by some other process.


      Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


      Q: What's that?
      A: It's blue light.
      Q: What does it do?
      A: It turns blue.

      Arvindhan PonnusamyA 1 Reply Last reply
      0
      • J.HilkJ J.Hilk

        @Arvindhan-Ponnusamy

        technically there's also

        delete poQQuickView;

        But what is your thought process behind this?
        If you free memory, that RAM entry isn't really deleted as in overwritten with 0, but its just markt as "use this as you see fit" for ANY other program in your OS.

        So you cant expect to grap that memory later on and simply use it again as if nothing happend. Its 100% sure to be, at least partially, overwritten by some other process.

        Arvindhan PonnusamyA Offline
        Arvindhan PonnusamyA Offline
        Arvindhan Ponnusamy
        wrote on last edited by
        #3

        @J.Hilk I dont want to delete QWindow but need to clear the contents from graphic memory 100%

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved