//would class is a simple list, use malloc as node application memory
//in the clear function to use free release all node
//initialized in the constructor head node, so use new
Linker* arr=new Linker (a);
Char [] const s={' A ', 'B', 'C', 'D', 'E', 'F'};
//1 to add, delete, insert... .
Arr - & gt; The clear ();
The delete arr.
Arr=NULL;
[/align]
CodePudding user response:
The code is not complete, cannot judgeCodePudding user response:
Code is not complete, but look at your description, there is a constant string s, supposedly you free memory in the clear function estimation and it is related to the memory of the array itself can't be free