#1766588690
[ golang ]
New go feature soon to be released in 1.26, the runtime/secret package.
secret.Do(func() {
// Some secrets that should not be in
// memory any time time long then need
})
As soon as this new Do function exits all registries, stack and heap values get deleted as soon as possible, even if a panic occurs. Great to see that Go is still adding features for better explicit control over memory, even though it still uses a garbage collector.