DriverShim destroy (C++ only)

Frees any resources allocated by the driver, including the driver object.

Syntax

C++

  #include "NativeInterface.h"
  
  void METHOD_CALL destroy (
     void);
  

Remarks

The DirXML engine calls this method for a C++ driver when the driver object is no longer required by the engine. The destroy method is called after the DriverShim shutdown method is called or after the getSchema method is called, depending on the mode. The destroy method will also be called after the DriverShim init method is called if the init method returns a fatal error in its return document.

The destroy method is responsible for freeing all resources used by the driver instance, including the driver instance itself. After the destroy method returns, no further calls or references to the driver instance are made.

C++ Sample Code

The following code from the C++ skeleton driver implements this method.

  void METHOD_CALL CSkeletonDriver::destroy(void)
  
  {
     common.tracer->trace("destroy");
     delete   this;
  }
  

In the DirXML sample code, see the destroy method in the DriverShimImpl.cpp file.