Finalizer.register(java.lang.Object)
I need to know th use of Finalizer.register(java.lang.Object) method.Can someone please help me...Its urgent!!!!Thank you!!Message was edited by: Java_Freak
> I need to know th use of> Finalizer.register(java.lang.Object) method.> For what purpose?> Can someone please help me...Its urgent!!!!I'll bet it is.
It is for queuing purpose........has it anything to do with the GC ?
> It is for queuing purpose........> > has it anything to do with the GC ?Yes. More or less.
Are you having a problem with some reference queue? Why don't you post formatted code and explain your problem in some detail?
The probelm with this method call is it is using up eating up memory and some objects of Finalizer class are not released even after GC.....I need to know the reason...
1) You can search the bug database.and/or2) You could post code that reproduces the problem so that someone could actually try and help you.
Could u please tell me what reference queues are and why are they used ?Message was edited by: Java_Freak
> Could u please tell me what reference queues are and
> why are they used ?
>
Could you please tell me if that is relevent to your problem? I don't know that it is. I had to guess because you don't seem to want to provide actual information.
Please answer the following. Are you?:
a) Working on some code that is having a problem
b) Studying for a test or exam
I am instantiating a MQQueue object..... When I run the memory debugger it says a call is made to the Finalizer.register method and the FInalizer object is on heap even after the GC...
> I am instantiating a MQQueue object..... When I run
> the memory debugger it says a call is made to the
> Finalizer.register method and the FInalizer object is
> on heap even after the GC...
Why is this a problem? If it is a problem again
1) Consult the bug database
2) Post formatted code that reproduces your problem.
Other than that consult these
http://java.sun.com/developer/technicalArticles/ALT/RefObj/
http://www.javaworld.com/javaworld/javatips/jw-javatip79.html
This is the best and only advice I can give you based on your problem description.
Can anyone please explain me the relationship between Finalizer.register and the ReferenceQueue ?Also, state the differnce between Final refernce and teh otehr three types (SoftReference, WeakReference and PhantomReference)....
What did the articles linked above tell you?Do you ever plan on posting any code? Frankly if you're not going to post code than go to another site. There is no help for you here.