Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Beginning Java
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Beginning Java
When will the object get garbage collected
Chandra Bairi
Ranch Hand
Posts: 152
posted 20 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
in this particular code at which step will the object get garbage collected
a:
String
s = new String("hi");
B:s=null;
c:
a)
B)
c)
Thanks in advace.
Thanks,
Shekar
Jeroen Wenting
Ranch Hand
Posts: 5093
posted 20 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
at some point after you set it to null but before the JVM terminates, it is impossible to be more specific than that.
42
Chandra Bairi
Ranch Hand
Posts: 152
posted 20 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
That is can i say that the object is eligible for garbage collection "AFTER EXECUTING" step b
Thanks,
Shekar
Tom Wolve
Ranch Hand
Posts: 32
posted 20 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Exactly.
Don't get me started about those stupid
light bulbs
.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Finalize method
about finalize() method
gc
Question about Garbage collection from ExamLab diagnostic Test
another question regarding garbage collection
More...