if (queue==null) {
queue = new ReferenceQueue();
}
// Check to see whether any old buttons have
// been enqueued for GC. If so, look up their
// PCL instance and remove it from its Action.
OwnedWeakReference r;
while ( (r = (OwnedWeakReference)queue.poll()) != null) {
AbstractActionPropertyChangeListener oldPCL =
(AbstractActionPropertyChangeListener)r.getOwner();
Action oldAction = oldPCL.getAction();
if (oldAction!=null) {
oldAction.removePropertyChangeListener(oldPCL);
}
}
this.target = new OwnedWeakReference(c, queue, this);