NightOwl888 commented on PR #1058:
URL: https://github.com/apache/lucenenet/pull/1058#issuecomment-2727572449

   > @NightOwl888 I really like your changes to decouple TokenStream from 
IDisposable. I think this will be a great change that allows those that need 
non-reusable-disposable TokenStreams to do so without carrying that baggage all 
the way through the virtual call hierarchy of our many TokenStream 
implementations that don't need it.
   
   Yeah. I thought about doing it this way on `Close()` also, but that diverges 
from Lucene quite a bit.
   
   Also, I noticed that `Close()` is executing the inner class prior to the 
current class, the same order as inherited constructors in Java. `Dispose()` is 
set up to execute the current class first followed by the inner class, which is 
what would be expected in .NET. It seems wrong to make the order of execution 
different between `Close()` and `Dispose()`, but it isn't clear which is the 
more sensible option. We could potentially break something important by 
changing `Close()`.


-- 
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

Reply via email to