webengine/widgetengine/src/WidgetEngineBridge.cpp
branchRCL_3
changeset 36 c711bdda59f4
parent 26 cb62a4f66ebe
child 48 79859ed3eea9
equal deleted inserted replaced
35:1f3c3f2f5b0a 36:c711bdda59f4
    94 //
    94 //
    95 // ----------------------------------------------------------------------------
    95 // ----------------------------------------------------------------------------
    96 void WidgetEngineBridge::Clear()
    96 void WidgetEngineBridge::Clear()
    97 {    
    97 {    
    98 	// unprotect objects
    98 	// unprotect objects
    99 	HashSet<JSValue*>::iterator end = m_protectedObjects.end();
    99     HashCountedSet<JSValue*>::iterator end = m_protectedObjects.end();
   100 	for (HashSet<JSValue*>::iterator it = m_protectedObjects.begin(); it != end; ++it) {
   100 	for (HashCountedSet<JSValue*>::iterator it = m_protectedObjects.begin(); it != end; ++it) {
   101 		Collector::unprotect(*it);
   101 		for(int count = it->second; count > 0; count--)
       
   102             Collector::unprotect(it->first);
   102 	}
   103 	}
   103 	m_protectedObjects.clear();
   104 	m_protectedObjects.clear();
   104 
   105 
   105     delete m_menuclient;
   106     delete m_menuclient;
   106     m_menuclient = NULL;
   107     m_menuclient = NULL;