1 # Copyright (C) all contributors <meta@public-inbox.org>
2 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
4 package PublicInbox::OnDestroy;
8 shift; # ($class, $cb, @args)
9 bless [ @_ ], __PACKAGE__;
12 sub cancel { @{$_[0]} = () }
15 my ($cb, @args) = @{$_[0]};
16 if (!ref($cb) && $cb) {