예제 #1
0
 public void Dispose()
 {
     if (RefCountMap.ContainsKey(Segments))
     {
         RefCountMap[Segments]--;
         if (RefCountMap[Segments] == 0)
         {
             RefCountMap.Remove(Segments);
             VertexMap = null;
             IndexMap  = null;
         }
     }
 }
예제 #2
0
 public void Dispose()
 {
     // Don't delete VBOs unless all DebugRenderBox objects have been deleted
     if (CreateCaps)
     {
         if (RefCountMap.ContainsKey(Hash))
         {
             RefCountMap[Hash]--;
             if (RefCountMap[Hash] == 0)
             {
                 RefCountMap.Remove(Hash);
                 VertexMap = null;
                 IndexMap  = null;
             }
         }
     }
 }
예제 #3
0
        public void RemoveRef(uint strokeId)
        {
            if (RefCountMap.ContainsKey(strokeId))
            {
                var currentRef = RefCountMap[strokeId];

                if (currentRef <= 1)
                {
                    RefCountMap.Remove(strokeId);
                    StrokeMap.Remove(strokeId);
                }
                else
                {
                    RefCountMap[strokeId]--;
                }
            }
        }