shutdown
static void shutdown();
Invokes registered closers. All closers are attempted, then the first failure is rethrown.
Essentials
Register resources for coordinated application shutdown.
#include <mc/resource.h>Implement CResource::closeResource() in a resource subclass. Keep shutdown and resource lifetimes coordinated, particularly during concurrent destruction.
class CResourceManagerstatic void shutdown();
Invokes registered closers. All closers are attempted, then the first failure is rethrown.
class CResourceRegisters the resource for coordinated shutdown. Its lifetime must be coordinated with shutdown callbacks; destruction unregisters it.
virtual void closeResource() = 0;
Implement this to close the resource during coordinated shutdown. It must leave the object safe for later destruction; registration does not transfer object ownership.
virtual ~CResource();