Message5897

Author zyasoft
Recipients thijs, zyasoft
Date 2010-07-14.18:54:22
SpamBayes Score 0.16603138
Marked as misclassified No
Message-id <1279133663.73.0.0407335714787.issue1634@psf.upfronthosting.co.za>
In-reply-to
Content
One could also potentially implement sys.getrefcount using JVMTI to introspect the heap:
http://download.oracle.com/docs/cd/E17476_01/javase/1.5.0/docs/guide/jvmti/jvmti.html#IterateOverReachableObjects

However, some big issues: it would certainly not the O(1) op one expects with sys.getrefcount(o); and JVMTI is not guaranteed to exist, and its usage certainly would violate the security model in most/all containers.

I don't know how AMF is using this, but presumably this is related to deep-copy ops, in which case the approach used by the copy module might be preferable.
History
Date User Action Args
2010-07-14 18:54:23zyasoftsetmessageid: <1279133663.73.0.0407335714787.issue1634@psf.upfronthosting.co.za>
2010-07-14 18:54:23zyasoftsetrecipients: + zyasoft, thijs
2010-07-14 18:54:23zyasoftlinkissue1634 messages
2010-07-14 18:54:22zyasoftcreate