Esempio n. 1
0
            public static AppleWithRefCounter2 Alloc()
            {
                AppleWithRefCounter2 apple = ObjectAllocatorHolder <AppleWithRefCounter2> .Allocate();

                return(apple);
            }
Esempio n. 2
0
        static void TestReferenceCounteredObjectPool2()
        {
            AppleWithRefCounter2 apple = AppleWithRefCounter2.Alloc();

            apple.ReleaseReference(); // compile will fail, if not release thanks to code analysis
        }