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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T22:43:38+00:00 2026-06-02T22:43:38+00:00

Near the very bottom of this page about Debugging on the Android developer site

  • 0

Near the very bottom of this page about Debugging on the Android developer site it says

The debugger and garbage collector are currently loosely integrated. The VM guarantees that any object the debugger is aware of is not garbage collected until after the debugger disconnects. This can result in a buildup of objects over time while the debugger is connected. For example, if the debugger sees a running thread, the associated Thread object is not garbage collected even after the thread terminates.

So what are the precise implications here? Am I to assume that :

  1. Any Log call inside a thread will cause that thread to never be collected?
  2. Any Log call inside a method that lives in the UI thread, that is called from within thread X means that thread X will never be collected?
  3. Any log call inside a method that even contains the construction of a new instance of thread or runnable might be impossible to garbage collect?

If this is true :

  1. Does this apply only if the application is explicitly marked as debuggable in the AndroidManifest.xml?
  2. Does it apply even if the device is not actively connected to a debugger?
  • 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-06-02T22:43:46+00:00Added an answer on June 2, 2026 at 10:43 pm

    Unless a debugger is currently attached, GC runs as normal. Calls to Log are not special in any way. While a debugger is attached, there are no guarantees that any object will be collected, because the debugger may be holding extra references to anything it feels like. Once the debugger disconnects the next GC will happen as normal and collect the objects that were preserved before. It’s not possible to say exactly which objects will not be collected as the debugger can do whatever it thinks it needs to.

    Just reading logcat output is not “having a debugger attached”. It refers specifically to the actual Java debugger, e.g. setting breakpoints, single stepping.

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

Sidebar

Related Questions

Versioned URL's are mentioned near the bottom of this section with very little explanation:
I think i follow instruction from this site very carefully http://source.android.com/source/downloading.html but when i
I'm currently implementing a very complex tree structure to allow for near-instant data access,
I have a table on near the bottom of the page, which I want
We have a very high performance multitasking, near real-time C# application. This performance was
I am currently a developer working on a very task specific application; the user(s)
There's something very unsatisfactory about this code: /* Given a command string in which
I have near about 255 image frames for background animation, 99 frames of enemy
I have found the place near the very top in a T4MVC template file
For skimmers. The question is near the bottom just after the bold text. I

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.