GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Tech FAQs  >  Programming  >  Java
Go To First  |  Previous Question  |  Next Question 
 Java  |  Question 856 of 928    Print  
Memory Allocation
How can you ensure that the memory allocated by an object is freed?


  
Total Answers and Comments: 1 Last Update: March 23, 2009     Asked by: rajanimovva 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
March 23, 2009 00:38:56   #1  
haribcse Member Since: March 2009   Contribution: 1    

RE: Memory Allocation
Garbage collection in Java cannot be forced. JVM will decide when to free memory
 
Is this answer useful? Yes | No

 Related Questions

Tell me o/p of the mentioned code fragment.String s1 = "shailesh";String s2="shailesh";System.out.println(s1.equals(s2));System.out.println(s1==s2);
Answer is truetrueEvery time we make any string constant same memory referenced will be assigned if the string constant is same. That's why both obj. s1 and s2 refer to same memory. 
View Question | Asked by : Shailesh

A) before it enters a compute-intense section of codeB) before it enters a memory-intense section of codeC) before objects are finalizedD) when it knows there will be some idle time 

A) Random Memory InterfaceB) Remote Method InvocationC) Random Method InvocationD) Ramote Memory Interface 
Latest Answer : B) Remote Method Invocation ...

Find missing numbers in an unsorted sequence of 100 million positive integers with a memory of 64mb ram.
View Question | Asked by : tamilent

We know that when execution of java starts, 1 st public static void main(String args[]) methodis execute. so i have ask you that ,when main method is executed, it s static method. so at the time of execution of main method, object is not their. after that code under main method is run which contain object of classes.so Q. when main method is executed,at that time object is not in memory so at that time can i say that JAVA IS NOT OBJECT-ORIENTED???
ACCORDING TO ME yes,after main methode,code run which will create object after main method, java is OBJECT ORIENTED.  
Read Answers (3) | Asked by : nikunj jhala

Choice 1: Collect profiling and debugging statistics. Choice 2: Modify the number of bits a double variable uses. Choice 3 : Set the initial memory allocation pool size. Choice 4 :Modify the garbage 
Latest Answer : We can collect profiling and debugging statistics.  we can set the initial memory allocation pool size.  we can set the maximum memory allocation pool size.   we can modify the garbage collector's behavior, like we can disable ...
Read Answers (1) | Asked by : sesi

I want to know why JVM maintains it...? Where does stack and heap are maintained in OS memory or JVM's ? 
View Question | Asked by : Chetan

What would be the object size of class without a member ( i.e. no method and no variable) is created?Explanation : For sure, Object size will not zero as we print the object on console, hash code get printed, 
View Question | Asked by : Amit Chaudhary


How can you ensure that the memory allocated by an object is freed? 
Latest Answer : Garbage collection in Java cannot be forced. JVM will decide when to free memory ...


 Sponsored Links

 
Related Articles

Service Oriented Java Business Integration Review

Service Oriented Java Business Integration Review Introduction If you ve read through the texts which give you an introduction to SOA or Web Services you will often find them to be quite frustrating and the reason for this is because they spend too much time referencing business processes which are
 

Concepts of Object-Oriented Programming

Object Oriented JavaScript In this chapter you ll learn about OOP Object Oriented Programming and how it relates to JavaScript As an ASP NET developer you probably have some experience working with objects and you may even be familiar with concepts such as inheritance However unless you re already a
 

C++ Memory Management operators

C Memory Management operators Need for Memory Management operators The concept of arrays has a block of memory reserved The disadvantage with the concept of arrays is that the programmer must know while programming the size of memory to be allocated in addition to the array size remaining constant m
 

Java and Client Server Models

Java and Client Server Models The Role of Client Servers on the Web Client server models provide the essential mechanisms for working with the Internet In fact most of the World Wide Web is built according to this paradigm In client server models the web browsers run by millions of users are the cli
 

SQL Programming

SQL Programming Overview Anybody who has done something for a long time has probably wanted to change how things work at some point or another. A worker at a mill might have found a more efficient way of cutting logs, or a mathematics teacher might have had a hand in changing a school’s al
 

WinRunner Programming Concepts

If you want to create WinRunner scripts that are highly efficient, there are important programming concepts that you will want to become familiar with. Understanding these concepts will provide you with a large number of key benefits. In addition to understanding these concepts, you must also learn
 

Programming Languages Certification

IT Certification programs have several options that will offer you the best knowledge.  By learning everything that you need to know about information technology you will be able to open new doors to your career and personal business desires.  IT Certification offers several vari
 

Using UML with Java

Using UML with Java While Java is not a new language its application for the development of embedded systems is quite new Developers are beginning to take a second look at modeling languages such as UML and many feel it can be a powerful tool in their development arsenal mosgoogle center Introductio
 

Neuro-linguistic Programming Methods

Neuro linguistic Programming Methods There are several methods used for performing Neuro linguistic Programming on an individual for obtaining insights into the psyche of the person in order to correct to modify certain patterns of behavior These techniques are also used for Neuro linguistic trainin
 

The Difficult Past of Neuro-linguistic programming

The Difficult Past of Neuro linguistic programming Neuro linguistic programming has had a rocky past with a number of lawsuits rivalry unsystematic development and intermittent progress During the 1980s the two founders separated after the lawsuit filed by Bandler Bandler went on to file several law
 

About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape