you are viewing a single comment's thread
view the rest of the comments
[–] 1 point 1 month ago* (last edited 1 month ago)

But if you ever forget the with keyword, you have a leak. With proper RAII the resource acquisition and release is a property of the object's type and impossible to forget. RAII doesn't just mean "resource acquisition is initialization", it also implies "destruction is resource release".

  • source
  • parent