News for hackers. Stuff that matters.
Re:Four Years of Jai by kbr- on Monday April 21, 2025 @05:22AM (#43749888)
You may also want to pass a resource through something like a channel, promise/future pair or similar. So it's not just down/up the callstack, sometimes it's "sideways". In those cases RAII is a life savior. Otherwise you have to explicitly remember about covering all possibilities: - what if resource never enters the channel - what if it enters the channel but never gets retrieved on the other side - what if the channel gets closed - what if other side tries to retrieve but cancels

Or you leak the resource.

There are no comments on this comment yet.