[This is preliminary documentation and subject to change.]
When your server no longer needs COM services, use the OleUninitialize(); function to close the COM library. Closing the COM library is required by COM standards; failing to do so will result in memory leaks.
// Attempt to close OLE.
OleUninitialize();