WheelMUD
WheelMUD copied to clipboard
Disposables are not always 'using'
Although some of these were fixed already, we may be missing other opportunities to release stream resource locks and such in a timely manner. We should do a pass looking for common IDisposables like StreamReaders, StreamWriters, and so on, and wrap them properly in using(...) { ... }
Perhaps assess an object inheritance tree or whatnot to find which classes we use that might be IDisposable without even realizing it.
With the latest syntactic sugar, we don't even need the { } scope for these. e.g.
using var stream = new MemoryStream();
using var compressedStream = new DeflaterOutputStream(stream);
...
return returnBytes;
@DrunkenImpGameStudio is starting this. (I don't know why it isn't letting me assign this ticket yet.)
I'll handle this.
If this is still ongoing I will take a look.
This looks like it has been completed.