コード例 #1
0
            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.");
                }
            }
コード例 #2
0
            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.");
                }
            }