GLEnv::~GLEnv() { // Destroy surfaces for (std::map<int, SurfaceWindowPair>::iterator it = surfaces_.begin(); it != surfaces_.end(); ++it) { if (it->first != 0 || created_surface_) { eglDestroySurface(display(), it->second.first); if (it->second.second) { it->second.second->Destroy(); delete it->second.second; } } } // Destroy contexts for (std::map<int, EGLContext>::iterator it = contexts_.begin(); it != contexts_.end(); ++it) { if (it->first != 0 || created_context_) eglDestroyContext(display(), it->second); } // Destroy attached shaders and frames STLDeleteValues(&attached_shaders_); STLDeleteValues(&attached_vframes_); // Destroy display if (initialized_) eglTerminate(display()); // Log error if this did not work if (CheckEGLError("TearDown!")) ALOGE("GLEnv: Error tearing down GL Environment!"); }
/** * Cleanup this responder */ DimmerResponder::~DimmerResponder() { STLDeleteValues(&m_sub_devices); }
void CommonMemoryCacheGroup::ClearAll() { Mutex::Locker locker(&m_mutex); STLDeleteValues(&m_cache_map); }