I was looking at the atexit module the other day; it seems like an elegant
way to ensure that resources are cleaned up (that the garbage collector
doesn't take care of).
But while you can mark functions to be called with the 'register' method,
there's no 'unregister' method to remove them from
On 4/26/05, Nick Jacobson [EMAIL PROTECTED] wrote:
I was looking at the atexit module the other day; it seems like an elegant
way to ensure that resources are cleaned up (that the garbage collector
doesn't take care of).
But while you can mark functions to be called with the 'register'
[Nick Jacobson]
I was looking at the atexit module the other day; it seems like an
elegant
way to ensure that resources are cleaned up (that the garbage
collector
doesn't take care of).
But while you can mark functions to be called with the 'register'
method,
there's no 'unregister' method
Nick Jacobson wrote:
But while you can mark functions to be called with the 'register'
method, there's no 'unregister' method to remove them from the stack of
functions to be called.
You can always build your own mechanism for managing
cleanup functions however you want, and register a
single