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

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

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

            return walker.Roots;
        }