开发者

NUnit- Object dispose

开发者 https://www.devze.com 2023-02-15 01:12 出处:网络
I have a test application, that contains 29 Test\'s inside Single TestFixture.I have defined single TestFixtureSetUp and TestTearDown.Each test internally create many Objects which inturn contains man

I have a test application, that contains 29 Test's inside Single TestFixture.I have defined single TestFixtureSetUp and TestTearDown.Each test internally create many Objects which inturn contains many Thread. T开发者_StackOverflow中文版ill Now I didnt used IDisposable.

My Doubt: Will the objects be disposed after completing each test by the Nuint. Please correct me if i am wrong.

Sorry, if i am wrong. Thanks, Vigi


AFAIK the objects will be processed by the garbage collector non-deterministically. Nothing special is done by NUnit to dispose of anything created in the test, I've often had situations where I've crashed the test runner. You'll probably want to manage and destroy the threads inside each test.

0

精彩评论

暂无评论...
验证码 换一张
取 消