private void copyTables ( ) { // Start by copying our parent's bindings prefixTable = ( Hashtable ) prefixTable . clone ( ) ; uriTable = ( Hashtable ) uriTable . clone ( ) ; // Replace the caches with empty ones, rather than // trying to determine which bindings should be flushed. // As far as I can tell, these caches are never actually // used in Xalan... More efficient to remove the whole // cache system? **** if ( elementNameTable != null ) elementNameTable = new Hashtable ( ) ; if ( attributeNameTable != null ) attributeNameTable = new Hashtable ( ) ; tablesDirty = true ; }
Copy on write for the internal tables in this context .