Deleting the dictionary from memory and disk

This example shows two different forms used to delete a dictionary using the SetDestroyFileOnDelete member function.

The first form deletes the dictionary from memory, but leaves it on the disk. You do this by passing the FALSE boolean value to the SetDestroyFileOnDelete member function.

          // example of using TDiskDictionary::SetDestroyFileOnDelete
          dict->SetDestroyFileOnDelete(FALSE);    // leave files intact when dict deleted
          delete dict;
The second form deletes the dictionary file from the hard disk. You do this by passing the TRUE boolean value to the SetDestroyFileOnDelete member function.

          // example of using TDiskDictionary::SetDestroyFileOnDelete
          dict3->SetDestroyFileOnDelete(TRUE);
          // remove the files when dict is deleted
          delete dict3;

[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker