Hacker News new | ask | show | jobs
by cessor 2211 days ago
If you limit the scope of usage, the old wallet should be garbage collected as soon as you have the new one. If you don't want to rely on that, or the point in time when gc happens is important or you're dealing with sensitive data, then the environment should allow you to perform appropriate cleanup actions and for you to utilize a different means to control and protect the data.
1 comments

As josephcsible said in a post parallel to yours, affine types can do this for you. If not, though... if you never mess up and keep a reference to the old one, you're good. I don't care when it's garbage collected; if there's no reference to it, it's not going to be used. But if anybody, ever, keeps a reference...