[Python-Dev] weak refs and jython

Fred L. Drake, Jr. fdrake@acm.org
Wed, 31 Jan 2001 15:25:51 -0500 (EST)


Samuele Pedroni writes:
 > AFAIK using java weak refs (which I think is a natural choice) I see
 > no way (at least no worth-the-effort way) to implement this in jython.
 > Java weak refs cannot be resurrected.

  This is certainly annoying.
  How about this: the callback receives the weak reference object or
proxy which it was registered on as a parameter.  Since the reference
has already been cleared, there's no way to get the object back, so we
don't need to get it from Java either.
  Would that be workable?  (I'm adjusting my patch now.)


  -Fred

-- 
Fred L. Drake, Jr.  <fdrake at acm.org>
PythonLabs at Digital Creations