if ( component instanceof ReleasableComponent )
{
((ReleasableComponent)component).releaseOnComponentHandler();
return;
}
final ComponentHandler handler = (ComponentHandler) m_used.remove( new ComponentKey( component ) );
if ( null == handler )
{
if ( null == m_parent )
{
/* This is a purplexing problem. SOmetimes the m_used hash
* returns null for the component--usually a ThreadSafe
* component. When there is no handler and no parent, that
* is an error condition--but if the component is usually
* ThreadSafe, the impact is essentially nill.
*/
//Pete: This occurs when objects are released more often than
//when they are aquired
//Pete: It also happens when a release of a ComponentSelector occurs
}
else
{
m_parent.release( component );
}
}
else
{
handler.put( component );
}
}