webengine/osswebengine/JavaScriptCore/kjs/identifier.cpp
changeset 13 10e98eab6f85
parent 0 dd21522fd290
equal deleted inserted replaced
8:7c90e6132015 13:10e98eab6f85
    48 
    48 
    49 namespace KJS {
    49 namespace KJS {
    50 
    50 
    51 typedef HashSet<UString::Rep *> IdentifierTable;
    51 typedef HashSet<UString::Rep *> IdentifierTable;
    52 static IdentifierTable *table;
    52 static IdentifierTable *table;
       
    53 
       
    54 struct cleanupIdentifier {
       
    55     ~cleanupIdentifier() {
       
    56         if( table ) {
       
    57             table->clear();
       
    58             delete table;
       
    59             table=0;
       
    60         }
       
    61     }
       
    62 };
       
    63 static cleanupIdentifier cleanIdentifier;
    53 
    64 
    54 static inline IdentifierTable& identifierTable()
    65 static inline IdentifierTable& identifierTable()
    55 {
    66 {
    56     ASSERT(JSLock::lockCount() > 0);
    67     ASSERT(JSLock::lockCount() > 0);
    57 
    68