[Qt-interest] How does QT release its memory?

李亮亮 leecomcn at hotmail.com
Mon Dec 15 02:01:45 CET 2008


It is great,
Thank you all, guys.

Tuvok


From: Tim W 
Sent: Saturday, December 13, 2008 5:25 PM
To: 李亮亮 
Cc: qt-interest at trolltech.com 
Subject: Re: [Qt-interest] How does QT release its memory?


>Can I still use delete to reclaim memory manually?


I would advice you to use deleteLater on QObjects to make sure all pending events are removed.
You can use delete but then you'll have to remove the pending events yourself.


Cheers,
Tim


On Sat, Dec 13, 2008 at 9:57 AM, 李亮亮 <leecomcn at hotmail.com> wrote:

  Hi,
  Can I still use delete to reclaim memory manually?

  Tuvok


  From: techsgin 
  Sent: Saturday, December 13, 2008 9:50 AM
  To: 'Tim W' ; '李亮亮' 
  Cc: qt-interest at trolltech.com 
  Subject: RE: [Qt-interest] How does QT release its memory?


  Hi Tim





  Using Qt assistant Look for "Object Trees and Object Ownership"

  For more information in regards to Objects and threads see "Thread Support in Qt"   in section "Per-Thread Event Loop" 



  Regards

  TechSgin




------------------------------------------------------------------------------

  From: qt-interest-bounces at trolltech.com [mailto:qt-interest-bounces at trolltech.com] On Behalf Of Tim W
  Sent: Saturday, December 13, 2008 10:40 AM
  To: ???
  Cc: qt-interest at trolltech.com
  Subject: Re: [Qt-interest] How does QT release its memory?





  <quote http://doc.trolltech.com/4.4/objecttrees.html >

    QObjects organize themselves in object trees. When you create a QObject with another object as parent, it's added to the parent's children() list, and is deleted when the parent is ....  

  </quote>



  Cheers,

  Tim

  On Sat, Dec 13, 2008 at 8:11 AM, 李亮亮 <leecomcn at hotmail.com> wrote:

  Hi all,
  I am new to qt, and I have read some tutorials. 

  I found all of then use new to create objects, but never use delete to release. 

  Why?



  Tuvok


  _______________________________________________
  Qt-interest mailing list
  Qt-interest at trolltech.com
  http://lists.trolltech.com/mailman/listinfo/qt-interest




  -- 
  An Apple a day keeps Windows away

  ACCU - http://www.accu.org - Professionalism in Programming.




-- 
An Apple a day keeps Windows away

ACCU - http://www.accu.org - Professionalism in Programming.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20081215/fc40150d/attachment.html 


More information about the Qt-interest-old mailing list