1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-22 09:38:01 +02:00

Enhanced var capabilities for scripts and building

This commit is contained in:
Brian Fiete 2020-05-21 11:47:15 -07:00
parent 38551d7a1d
commit f8b27c13a2
4 changed files with 171 additions and 12 deletions

View file

@ -47,6 +47,16 @@ namespace System
}
}
public void ReleaseLastRef()
{
int refCount = Interlocked.Decrement(ref mRefCount);
Debug.Assert(refCount == 0);
if (refCount == 0)
{
delete this;
}
}
public int ReleaseRefNoDelete()
{
int refCount = Interlocked.Decrement(ref mRefCount);