C#'s "Dispose" pattern comes to mind here.

You don't leak memory, you just leak file handles and graphics resources instead when you forget to explicitly call Dispose().

Reply via email to