Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^3: Per-object DESTROY

by varian (Chaplain)
on Jul 08, 2007 at 13:53 UTC ( [id://625506]=note: print w/replies, xml ) Need Help??


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.

    ⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://625506]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (1)
As of 2024-04-24 13:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found