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 6945701
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T13:28:13+00:00 2026-05-27T13:28:13+00:00

What happens when an object which has a function currently being executed has all

  • 0

What happens when an object which has a function currently being executed has all its references removed?

I want to have a dialog box type object held in an array by the main class for my program, and when the dialog needs to be closed, I want it to be removed from the array during that close-screen function. My question is, assuming the dialog box object is in all other ways eligible for garbage collection, what happens to the code it’s supposed to be executing?

Edit for clarification:
The array is a layer of visual elements in my program, of which the dialog box is one. The idea is that the “OK” button (or whatever) that closes the box will also remove it from the array of objects being displayed at the same time.

  • 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-27T13:28:13+00:00Added an answer on May 27, 2026 at 1:28 pm

    If all references to the object have been removed while a function of this object is being executed, the rest of the function will keep executing. When it’s done, the object will be removed during the next garbage collection cycle.

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

Sidebar

Related Questions

In Android, I have a Path object which I happen to know defines a
I have an ASP.NET site that I am maintaining. Currently it has code that
I have a php function which inserts a searchbar into each page on a
I have a Page which has a Control on it with 2 textboxes (username
I have a custom UI control which has a JavaScript class written around the
I know it's by design that you can't control what happens when an object
What happens in the memory when a class instantiates the following object? public class
What happens when you call notifyAll method on an object that is not waiting?
My program uses a NetworkOutput object which can be used to write data to
I have my own implementation of smart pointer which uses reference counting as ownership

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.