4 ms·
defer is tied to function scope because that is the usecase it was designed for. go also has finalizers executing right before deallocation.
by jatone 5y ago
defer is tied to function scope because that is the usecase it was designed for.
go also has finalizers executing right before deallocation.