Search found 3 matches

by scot.prichard@med.ge.com
Wed Mar 15, 2006 10:25 pm
Forum: Future Improvements
Topic: MemAssertion.NoNewInstances(), NoNewInstancesExcept(Type)
Replies: 1
Views: 16271

MemAssertion.NoNewInstances(), NoNewInstancesExcept(Type)

Why does this code Assert? class Test { } class Program { static void Main(string[] args) { MemProfiler.FullSnapShot(); MemProfiler.FullSnapShot(); MemAssertion.NoNewInstances(); MemProfiler.FullSnapShot(); using (MemAssertion.BeginAssertions()) { MemAssertion.NoNewInstances(); } Test test = new Tes...
by scot.prichard@med.ge.com
Wed Mar 15, 2006 10:05 pm
Forum: Future Improvements
Topic: MemAssertion.NoInstances(Type[], bool)
Replies: 1
Views: 16220

MemAssertion.NoInstances(Type[], bool)

Why doesn't this code assert? class Parent { } class Child : Parent { } class Program { static void Main(string[] args) { Type[] types = new Type[] { typeof(Parent) }; MemProfiler.FastSnapShot(); MemAssertion.NoInstances(types, true); Child child = new Child(); MemAssertion.NoInstances(types, true);...
by scot.prichard@med.ge.com
Mon Mar 13, 2006 9:15 pm
Forum: Future Improvements
Topic: System.Collections.Generic.List<>
Replies: 1
Views: 16285

System.Collections.Generic.List<>

Why does the list appear as a leak between MemSnapShot 2/3 but the array between MemSnapShot 1/2 does not? ----------- using System; using System.Collections.Generic; using System.Text; namespace test0313 { class Program { private class Leak { } private static void TestArray() { Leak[] array = new L...