paulirwin commented on code in PR #1096: URL: https://github.com/apache/lucenenet/pull/1096#discussion_r1919258709
########## src/Lucene.Net.TestFramework/Support/Util/RandomizedContext.cs: ########## @@ -189,19 +184,11 @@ internal void AddDisposableAtEnd(IDisposable resource) internal void DisposeResources() { - if (toDisposeAtEnd is not null) + Lazy<ConcurrentQueue<IDisposable>>? toDispose = Interlocked.Exchange(ref toDisposeAtEnd, null); Review Comment: It didn't seem to me from reading the code like it needed to be set back to null, you would just dispose of all objects in the queue. If you then needed to dispose of more objects, they could be added to the same queue if the instance is shared and then disposed when cleared out again. But if you think it needs to be set to null, I defer to your judgement on that. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@lucenenet.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org