Don't use __destruct().

Call a finalization function from the plugin/manager/handler. __destruct() has a delay of several seconds, and this delay can lead to terrible things like files locked, etc.