Esempio n. 1
0
        internal IList <ClrRoot> EnumerateStaticRoots(bool resolveStatics)
        {
            var walker             = new NativeStaticRootWalker(this, resolveStatics);
            STATICROOTCALLBACK del = new STATICROOTCALLBACK(walker.Callback);
            IntPtr             ptr = Marshal.GetFunctionPointerForDelegate(del);

            _sos.TraverseStaticRoots(ptr);
            GC.KeepAlive(del);

            return(walker.Roots);
        }
Esempio n. 2
0
        internal IList<ClrRoot> EnumerateStaticRoots(bool resolveStatics)
        {
            var walker = new NativeStaticRootWalker(this, resolveStatics);
            STATICROOTCALLBACK del = new STATICROOTCALLBACK(walker.Callback);
            IntPtr ptr = Marshal.GetFunctionPointerForDelegate(del);
            _sos.TraverseStaticRoots(ptr);
            GC.KeepAlive(del);

            return walker.Roots;
        }