Yes, performance was the main consideration. We want
  objects to be disposed of as quickly as possible.

  Also, if the main issue is 'resurrecting' the object
  after taking it off the queue it's not a problem
  for the Disposer: we don't do that as all data
  which needs disposal is kept in a separate object
  (DisposerRecord).

  And, if the Disposer is used correctly we don't
  even use the reference to the main object itself,
  but to its 'disposer referent' - see earlier Jim's
  emails.

  Thanks,
    Dmitri


[EMAIL PROTECTED] wrote:
I'm curious why the Java2D mechanism uses
WeakReference instead of PhantomReference given the
problem mentioned here:

I also asked this question to myself severla times, because PhantomReferences 
seem to be exactly designed for what the Disposer uses Weak-References.

I think it could be related to performance, because Phantom-References can't be 
completly freed in one GC cycle as far as I know, but of course I may be 
completly wrong ;)

Would be really interesting to know the exact reason from someone who knows for 
sure ;)

, lg Clemens
[Message sent by forum member 'linuxhippy' (linuxhippy)]

http://forums.java.net/jive/thread.jspa?messageID=243389

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to