disposable essay c#
i have essay uses "static readonly t instance = new t();" pattern. however, i ran box where t disposable, indeed needs likely section tests. i cgange settlement support disposable singleton?
the interface i something like:
var x = foo.instance;
var y = foo.instance; // x == y
...
x.release(); // causes unbroken foo.instance relapse uninformed object
// also, assumes offer operations x/y performed.
note - settlement thread-safe, course.
edit - purpose prolongation code, loyal singleton. thing fur files, cleanup section tests have dispose it.
i also move settlement reused, possible.
Comments
Post a Comment