/* If a runtime driver exits with an error, it must call this routine to free the allocated resource before the exiting. It will ASSERT() if gBS is NULL. It will ASSERT() if that operation fails. */
EFI_STATUS EFIAPI RuntimeDriverLibDeconstruct(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
/* If a runtime driver exits with an error, it must call this routine to free the allocated resource before the exiting. It will ASSERT() if gBS is NULL. It will ASSERT() if that operation fails. */
EFI_STATUS EFIAPI RuntimeDriverLibDeconstruct(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
{
  EFI_STATUS  Status;
  ASSERT (gBS != NULL);
  Status = gBS->CloseEvent (mEfiVirtualNotifyEvent);
  ASSERT_EFI_ERROR (Status);
  Status = gBS->CloseEvent (mEfiExitBootServicesEvent);
  ASSERT_EFI_ERROR (Status);
  return Status;
}