CList::RemoveAll

从此移除所有元素列表并释放关联的内存。

void RemoveAll( );

备注

如果列表已经为空,则不生成。

示例

// Define myList.
CList<CString,CString&> myList;

// Add three elements to the list.
myList.AddTail(CString(_T("XYZ")));
myList.AddTail(CString(_T("ABC")));
myList.AddTail(CString(_T("123")));

// Remove all of the elements in the list.
myList.RemoveAll();

// Verify the list is empty.
ASSERT(myList.IsEmpty());      

要求

Header: afxtempl.h

请参见

参考

CList选件类

层次结构图

CList::RemoveAt