Re:TypeScript 5.2's New Keyword: 'using'
by Dylan16807 on Monday June 26, 2023 @02:08PM
(#36483420)
> from the programmers point of view it should still be usable (not disposed)
Then that programmer had their hopes too high. The basic "using" keyword is not for variables you want to move between scopes. Javascript doesn't do reference counting.
For saving/returning, you need to use explicit instances of DisposableStack and .move()
Then that programmer had their hopes too high. The basic "using" keyword is not for variables you want to move between scopes. Javascript doesn't do reference counting.
For saving/returning, you need to use explicit instances of DisposableStack and .move()