Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5931109
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T14:38:52+00:00 2026-05-22T14:38:52+00:00

Normally when I delete an object I set it to zero. This helps in

  • 0

Normally when I delete an object I set it to zero. This helps in that I code my routines to check the object is not zero then proceed.

However if I use the deleteLater() function I have lost control of it. I don’t know if its a valid item or if I need to create a new one. The solution I found was just to keep track of the state separately however is there a better way?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T14:38:53+00:00Added an answer on May 22, 2026 at 2:38 pm

    There is nothing wrong if you call deleteLater() on your object and then set your pointer to nullptr. Qt framework will safely delete the object for you.

    As an alternative you can also connect to destroyed signal to be notified of your object’s destruction and set your pointer to nullptr in that slot.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When onKeyListener is set Backspace/delete key is not functioning. I set an OnKeyListener on
I run an open source project that normally distributes our code in a universal
Normaly i would do a delete * from XXX but on this table thats
Normally I use imagecreatefromjpeg() and then getimagesize() , but with Firefox 3 I need
Normally you can do this: <select size=3> <option>blah</option> <option>blah</option> <option>blah</option> </select> And it would
Normally I create web application projects and use code-behind, but I have a requirement
Normally when you update an object in linq2sql you get the object from a
I've been reading somewere that when you use placement new then you have to
Note that the order can go either way (erase first then push back, just
I would like to know how you normally deal with this situation: I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.