Closed caglar10ur closed 5 years ago
Can you split in two PR, just keeping the finalizer changes in this one?
Btw, I agree with moving away from finalizers, we've had to do some weird tricks to have LXD and go-lxc behave in the past because of that :)
Oops, sorry, just saw the other PR now :)
So just need to clean this one to only contain the finalizer bits.
Glad to hear you agree :) Will rebase it on master and also check lxd and add Release() as needed
Thanks! :)
Handling our garbage explicitly is way more simpler and idiomatic then relying on runtime magic. Finalizers also are not guaranteed to run so stop using them, instead Container now provides Release() to call it via defer.
^ the idea is not to merge this as it is but start a discussion and learn whether you agree with this or not. I'll rebase/fix/cleanup after the discussion - this is for triggering the initial discussion.
P.S: this PR includes #114 for now