Reference.cs 334 B

12345678910111213141516171819
  1. namespace VEngine
  2. {
  3. public class Reference
  4. {
  5. public int count { get; private set; }
  6. public bool unused
  7. {
  8. get { return count <= 0; }
  9. }
  10. public void Retain()
  11. {
  12. count++;
  13. }
  14. public void Release()
  15. {
  16. count--;
  17. }
  18. }
  19. }