public void Reset() { s_TextureMap.Clear(); s_SpriteAtlasMap.Clear(); s_FontMap.Clear(); s_AudioMap.Clear(); }
internal void ClearPropertyMap() { // when clearing the property map we want to retain the styles that we have inherited from elsewhere // to do this, we need to read in the inherited values, store them, clear the map, then write the values back LightList <StyleProperty> inherited = LightList <StyleProperty> .Get(); inherited.EnsureCapacity(StyleUtil.InheritedProperties.Count); StyleProperty[] inheritedArray = inherited.Array; for (int i = 0; i < StyleUtil.InheritedProperties.Count; i++) { int key = BitUtil.SetHighLowBits(1, (int)StyleUtil.InheritedProperties[i]); if (propertyMap.TryGetValue(key, out StyleProperty inheritedValue)) { inherited.AddUnchecked(inheritedValue); } } propertyMap.Clear(); // re-apply values for (int i = 0; i < inherited.Count; i++) { int key = BitUtil.SetHighLowBits(1, (int)inheritedArray[i].propertyId); propertyMap.Add(key, inheritedArray[i]); } LightList <StyleProperty> .Release(ref inherited); }
public void Close() { if (colorMap != null) { colorMap.Clear(); } closed = true; }
public void Clear(bool call) { typemap.Clear(); groupmap.Clear(); instmap.Clear(); if (call) { all.Clear(); } }