public void AddRef(COWValue holder) { referenceCount++; #if UDONSHARP_DEBUG holders.Add(holder); #endif if (visitorContext.topTable != tableCreationScope) { throw new Exception($"COWSymbolValue for {originalSymbol} has had ref added from different symbol table scope."); } }
public void ClearRef(COWValue holder) { referenceCount--; #if UDONSHARP_DEBUG if (!holders.Remove(holder)) { throw new Exception("No matching holder for COWValue"); } #endif if (visitorContext.topTable != tableCreationScope) { throw new Exception($"COWSymbolValue for {originalSymbol} has been disposed from different symbol table scope."); } }