CList instance and "delete"

 

Hi, i would just question if in these code:

CList *list=new CList();  

list.Add(new MyClass());
list.Add(new MyClass());
list.Add(new MyClass());

delete list; 

the last command "delete" will also free memory pointed by MyClass instances? Obviously with memory management flag as deafault.

Or i need to call list.Clear() before delete list?


Thanks

 
It will automatically call Clear() from the destructor of Clist
 
Thanks.