in reply to Re^2: Per-object DESTROY
in thread Per-object DESTROY

ReleaseAction would require you to synchronize the out-of-scope moment between the two objects.

Wouldn't the classy way be to subclass Archive::Extract just inheriting its methods, and to implement your own DESTROY method in the subclass that invokes SUPER::DESTROY as its last action?

Replies are listed 'Best First'.
Re^4: Per-object DESTROY
by diotalevi (Canon) on Jul 08, 2007 at 18:19 UTC

    In this case, the destruction moment isn't really identical. It would have been cheap and easy to join the two and it was my first thought. A better idea is to discard the archive object as soon as I've used it up and then retain the cleanup handle until I'm finished working with its extracted contents.

    ⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊