Prepare for your Next Interview
|
Welcome to the Geeks Talk forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
This is a discussion on can we call Finalize() ? within the Java forums, part of the Software Development category; can we call finalize()?...
|
|||||||
|
|||
|
Re: can we call Finalize() ?
ofcourse we can call finalize method, and System.gc() is also made for requesting the garbage collection...although System.gc() do not guarantee the garbage coolection.
|
|
|||
|
Re: can we call Finalize() ?
yes we can call the garbage collection methods, but there is no guarantee that objected marked for garbage collection will be infact garbage collected.
Ideally we should not do call or write logic based on garbage collection. It is the duty of the JVM to call this method. |
|
|||
|
Re: can we call Finalize() ?
Hi Friend,
Yes. Nobody will stop us to call any method , if it is accessible in our class. But a garbage collector cannot call an object's finalize method if that object is reachable. Regards, Rijus.
__________________
Real Inspirational Journey............Unanimously & Sincerely. |
|
|||
|
Re: can we call Finalize() ?
Yes you can call finalize(), but why you want to do something like this?
Share the problem statement, we might provide you a solution... if you may allow us. |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Call by Value and Call by Reference | Lokesh M | C and C++ | 2 | 06-23-2009 02:29 AM |
| dispose,finalize | venkat.rbs | VB.NET | 3 | 02-13-2008 10:33 AM |
| C++, Call another C++ program | youarehappy41 | MainFrame | 0 | 09-25-2007 09:31 AM |
| Need more information on finalize method. | TigerElango | Java | 2 | 08-16-2007 08:06 AM |
| How can i call that function? | JobHelper | Java | 1 | 12-06-2006 02:16 AM |