|
INTERVIEW QUESTIONS
J2EE
JAVA
DETAILS
Question: What are the disadvantages of reference counting in garbage collection
Answer: An advantage of this scheme is that it can run in small chunks of time closely interwoven with the execution of the program. This characteristic makes it particularly suitable for real-time environments where the program can't be interrupted for very long. A disadvantage of reference counting is that it does not detect cycles. A cycle is two or more objects that refer to one another, for example, a parent object that has a reference to its child object, which has a reference back to its parent. These objects will never have a reference count of zero even though they may be unreachable by the roots of the executing program. Another disadvantage is the overhead of incrementing and decrementing the reference count each time. Because of these disadvantages, reference counting currently is out of favor
|
|
|
Category |
Java Interview Questions & Answers -
Exam Mode /
Learning Mode
|
Rating |
(0.2) By 8657 users |
Added on |
7/17/2011 |
Views |
68450 |
Rate it! |
|
|
Question:
What are the disadvantages of reference counting in garbage collection
Answer:
An advantage of this scheme is that it can run in small chunks of time closely interwoven with the execution of the program. This characteristic makes it particularly suitable for real-time environments where the program can't be interrupted for very long. A disadvantage of reference counting is that it does not detect cycles. A cycle is two or more objects that refer to one another, for example, a parent object that has a reference to its child object, which has a reference back to its parent. These objects will never have a reference count of zero even though they may be unreachable by the roots of the executing program. Another disadvantage is the overhead of incrementing and decrementing the reference count each time. Because of these disadvantages, reference counting currently is out of favor Source: CoolInterview.com
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|
|
Related Questions |
View Answer |
|
What is EJB
|
View Answer
|
|
What is the sweep and paint algorithm
|
View Answer
|
|
What is reflection API? How are they implemented
|
View Answer
|
|
What is the primary advantage of XML driven Java Beans
|
View Answer
|
|
Will there be a performance penalty if you make a method synchronized? If so, can you make any design changes to improve the performance
|
View Answer
|
|
In Java, how are objects / values passed around
|
View Answer
|
|
can we declare multiple main() methods in multiple classes.ie can we have each main method in its class in our program?
|
View Answer
|
|
If there are 2 different versions of object streams on disk and only one object definition, how will the JVM reject the wrong one? Can you fool the JVM
|
View Answer
|
|
How is serialization implemented in Java
|
View Answer
|
|
How would you pass a java integer by reference to another function
|
View Answer
|
|
Can a method be static and synchronized
|
View Answer
|
|
How all can you instantiate final members
|
View Answer
|
|
What do you like most with Ant
|
View Answer
|
|
What is phantom memory
|
View Answer
|
|
What are the differences between AWT and Swing
|
View Answer
|
|
Is it advisable to depend on finalize for all cleanups
|
View Answer
|
|
How would you declare a SingleThreaded servlet
|
View Answer
|
|
What are the differences between EJB and Java beans
|
View Answer
|
|
What are STRUTS
|
View Answer
|
|
Explain Servlet and JSP life cycle
|
View Answer
|