×

Discussion Board

Results 1 to 2 of 2

Hybrid View

  1. #1
    Registered User
    Join Date
    Feb 2012
    Posts
    1

    Question entering and leaving a new event loop will not perform the deferred deletion ?

    Hi All,

    In QT document of deleteLater ,it said:

    Note that entering and leaving a new event loop (e.g., by opening a modal dialog) will not perform the deferred deletion; for the object to be deleted, the control must return to the event loop from which deleteLater() was called.

    I am not quite understand what it means, there is an article http://agateau.wordpress.com/2010/09...ctdeletelater/
    ,but it is still confusing me .

    could somebody give me an example for this ?

    Thanks

  2. #2
    Registered User
    Join Date
    Sep 2011
    Posts
    449

    Re: entering and leaving a new event loop will not perform the deferred deletion ?

    Hi,

    http://www.qtcentre.org/archive/index.php/t-22379.html

    The discussion in the above link is helpful in understanding the use of deleteLater.

    deleteLater has to be used exactly when you would want to delete the object that is allocated using new on the heap.

    Make sure you do not refer to it again after you make this call.

    It might deallocate the memory immediately or later based on which event has control on it.

Similar Threads

  1. Contact deletion event
    By say2paul in forum Symbian
    Replies: 7
    Last Post: 2010-09-03, 11:10
  2. Event loop in console application....
    By VinodRaut in forum Symbian
    Replies: 4
    Last Post: 2007-10-22, 17:23
  3. How I Can handle event in an activ loop
    By netrixe in forum Symbian
    Replies: 1
    Last Post: 2003-11-26, 02:42
  4. Send an event to the event loop
    By thedawn1977 in forum Symbian User Interface
    Replies: 0
    Last Post: 2002-12-21, 12:41
  5. stop a loop by a key event
    By shadowplay in forum Symbian
    Replies: 1
    Last Post: 2002-12-16, 08:42

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×