> The best way is to have an IService provider with a stopService method > which does whatever shutdown cleanup you want done, possibly returning > a Deferred which doesn't fire until it has finished. However your app > is shut down, this will cause your cleanup code to run. Thank you, i will study how to implement this in my app. fabrizio