3 ms·
>Why does the caller have to figure out how to dispose? Rather than how the caller have to figure out when to dispose. Defer\using will wait till we out of sc
by konart 3y ago
>Why does the caller have to figure out how to dispose?
Rather than how the caller have to figure out when to dispose.
Defer\using will wait till we out of scope or till we return. While it may be much better to close\dispose as soon as possible or after some event.