Exemplo n.º 1
0
        internal IEnumerable <ClrRoot> EnumerateHandleRoots()
        {
            var            walker   = new NativeHandleRootWalker(this, _dacRawVersion != 10);
            HANDLECALLBACK callback = new HANDLECALLBACK(walker.RootCallback);
            IntPtr         ptr      = Marshal.GetFunctionPointerForDelegate(callback);

            _sos.TraverseHandleTable(ptr, IntPtr.Zero);
            GC.KeepAlive(callback);

            return(walker.Roots);
        }
Exemplo n.º 2
0
        internal IEnumerable<ClrRoot> EnumerateHandleRoots()
        {
            var walker = new NativeHandleRootWalker(this, _dacRawVersion != 10);
            HANDLECALLBACK callback = new HANDLECALLBACK(walker.RootCallback);
            IntPtr ptr = Marshal.GetFunctionPointerForDelegate(callback);
            _sos.TraverseHandleTable(ptr, IntPtr.Zero);
            GC.KeepAlive(callback);

            return walker.Roots;
        }