void MotorXtor(MotorData* d)
{
  if (d)
  {
      *d->mPort = 0;    
        // ensure motor stopped
      Free(d);
      DestroyVtable(Motor, &InstCount);
    }
}

Example 3: Destructor.

Back to Article