Re:TypeScript 5.2's New Keyword: 'using'
by ajanuary on Monday June 19, 2023 @01:03PM
(#36393511)
From what I can tell from that documentation, you do still have to remember to call `client.release()`. There's even a big warning saying "You must release a client when you are finished with it."
Presumably you would want to wrap that in a try/finally so that you don't accidentally not release the client if there is an exception.
Presumably you would want to wrap that in a try/finally so that you don't accidentally not release the client if there is an exception.
You would go from:
to