Hacker News new | ask | show | jobs
by Dylan16807 1094 days ago
> 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()