public static unsafe void CheckAliasingWithSelf()
        {
            var s = new AliasingWithSelf {
                ptr = null
            };

            s.ptr = (AliasingWithSelf *)&s;
            s.CheckAlias();
        }
Exemple #2
0
        public static unsafe void CheckAliasingWithSelf()
        {
            var s = new AliasingWithSelf {
                ptr = null
            };

            s.ptr = (AliasingWithSelf *)UnsafeUtility.AddressOf(ref s);
            s.CheckAlias();
        }