Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > A question about getting object address with sun.misc.Unsafe class

Reply
Thread Tools

A question about getting object address with sun.misc.Unsafe class

 
 
James
Guest
Posts: n/a
 
      01-26-2008
Dear all,

I'm wondering why sun.misc.Unsafe class allow us getting address of an
object. I'm assuming that address will be changed by GC so it's really
UNSAFE to use that address in any situation.

Is there any useful usage of this object address from using UnSafe
class?

Thanks a lot!

James Gan
 
Reply With Quote
 
 
 
 
Roedy Green
Guest
Posts: n/a
 
      01-28-2008
On Sat, 26 Jan 2008 06:21:39 -0800 (PST), James <(E-Mail Removed)>
wrote, quoted or indirectly quoted someone who said :

>Is there any useful usage of this object address from using UnSafe
>class?


I think serialisation uses it. It might be useful in debugging.
--
Roedy Green, Canadian Mind Products
The Java Glossary, http://mindprod.com
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
why should base class object points to derived class object (virtualfunction question) ? DanielJohnson C++ 7 01-17-2009 10:15 PM
using std::map in a template class, getting LNK2019 link error when creating an object from this template class girays C++ 1 01-20-2007 09:47 PM
Nested Class, Member Class, Inner Class, Local Class, Anonymous Class E11 Java 1 10-12-2005 03:34 PM
Object creation - Do we really need to create a parent for a derieved object - can't the base object just point to an already created base object jon wayne C++ 9 09-22-2005 02:06 AM
Passing derived class object array in place of base class object array justanotherguy63@yahoo.com C++ 9 12-03-2004 10:57 PM



Advertisments