you are viewing a single comment's thread
view the rest of the comments
[–] 4 points 1 month ago (1 child)

Maybe you're thinking of IDisposable with the using keyword. The problem with that is that you have to remember to use it in every call site. Nothing stops a caller from writing var x = new Foo() and walking away.

  • source
  • parent
  • hideshow 1 child comment