DeleteTag

The DeleteTag method deletes the specified tag from the taglist in which it belongs.  The tag is flagged as deleted, causing tag reading methods, like GetTag to no longer see the tag in the taglist.  However, memory allocated on behalf of the tag is not freed until the entire taglist is deleted.

void DeleteTag(
  LONG TagHandle // Handle of tag to delete from taglist
)

Parameters:
TagHandle Handle of tag to delete from taglist

Return Values:
None

Example:
var Tl, Th, TagInfo;

  // Create a taglist, add a tag, then delete it

Tl = CAS.New();
CAS.AddTag(Tl,"SUBJECT","This is a test.");

if ((Th = CAS.GetTagHandle(Tl,"SUBJECT",0)) != null)
  {
    // Deleting the tag makes it invisible to tag reading methods,
    // like GetTag or GetTagHandle.  You must still call
    // RetTagHandle to free the tag handle after the tag is deleted. 

  CAS.DeleteTag(Th);

  CAS.RetTagHandle(Th);
  }

if (CAS.GetTag(Tl,"SUBJECT",0) != "")
  {
    // Code here would never be executed, as the SUBJECT tag has been
    // deleted from the taglist, and GetTag will return "".
  }

CAS.Delete(Tl);

See Also:
CAS GetTagHandle, CAS RetTagHandle CAS GetTag, CAS Delete