Results 1 to 3 of 3

Thread: garbage collection *resolved*

Threaded View

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Oct 2002
    Location
    Propped up at a PC near you...
    Posts
    194

    garbage collection *resolved*

    could somebody explain how java uses garbage collection to reclaim unused memory space?

    From reading that I have done, I am not sure which way it goes about it:

    my example:

    TownBuilding = new Building("Town Hall"); //(a)
    TownBuilding = new Building("Public Library"); //(b)

    When b is coded, does java simply overwrite the contents or does it create a new Variable (b) and leave (a) for garbage collection?

    Very confused...
    Last edited by mbonfyre; Aug 18th, 2003 at 05:31 AM.

Posting Permissions

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



Click Here to Expand Forum to Full Width