Exemplo n.º 1
0
        public static async Task Dump(TextWriter log)
        {
            var(summary, delta) = await LeakHelpers.GetSummary(steady : true);

            log.WriteLine("Summary:");
            log.WriteLine(summary);
            log.WriteLine();
            log.WriteLine("Delta:");
            log.WriteLine(delta);
        }
Exemplo n.º 2
0
        bool HandleTimeoutHandler()
        {
            try {
                var(live, delta) = LeakHelpers.GetStatistics();

                var liveCount  = live.Sum(x => x.Value);
                var deltaCount = delta.Sum(x => x.Value);

                string title = string.Format("Live {0} ({1}{2})", liveCount, deltaCount >= 0 ? "+" : "", deltaCount);
                Window.Title      = title;
                Window.HasErrors |= deltaCount > 0;
            } catch {
                // maybe the collection was modified, don't bother with updating
            }
            return(true);
        }
Exemplo n.º 3
0
 void OnPadContentShown(object sender, EventArgs args)
 {
     // Force collection of objects.
     LeakHelpers.GetSummary(steady: false);
     HandleTimeoutHandler();
 }