News for hackers. Stuff that matters.
Re:Fixing a memory leak of xmlEntityPtr in librsvg by hfoiwufasdfw on Tuesday June 25, 2024 @12:15AM (#40784422)
Most languages have a rule of thumb when it comes to freeing resources; it is your responsibility to abide by them.

  Rust: drop
  C++: T::~T()
  C#: using + dispose
  Java: try-with + autocloseable, or finally
  Go: defer
  Haskell: bracket
  JavaScript: finally
  Python: finally or with + __exit__
Don't like it? Vote for linear types.

There are no comments on this comment yet.