Posted By:
Alexander_Krapf
Posted On:
Thursday, May 10, 2001 07:36 AM
Hi Kyle,
We at Codemesh have decided to always use long to store pointers in Java classes. Even if there is a way of detecting the native pointer size, I don't think you would want to take advantage of it. You would have to have two different Java implementations of the same class, one using 32bit poitners, the other using 64bit pointers. That sounds dangerously confusing and pointless, just in order to save a couple of bytes per instance.
I am not aware of a JNI provided type that assist in native pointer storage. If there were one, I would assume that they would choose to go with the largest reasonable size, just for portability reasons.
Good luck,
Alex