原因:
~CT()
{
//element_clear(C0);
element_clear(C1);
element_clear(C2);
if(C != NULL)
{
//for(int i=0; i<len; i++)
//{
//delete []T;
//T[i] = NULL;
//}
delete []C;
}
if(la != NULL)
{
//for(int i=0; i<len; i++)
//{
//delete []T;
//T[i] = NULL;
//}
delete []la;
}
//element_clear(C3);
//element_clear(s);
//element_init(R2,pairing->G1);
if(num != NULL) delete []num;
if(W != NULL) delete []W;
}
析构函数中if(la != NULL) .....出错,因为
CT()
{
element_init(C1,pairing->GT);
element_init(C2,pairing->G1);
num = NULL;
W = NULL;
C = NULL;
}
中没有la,之前里面有,后来删掉了,并没有把析构函数中对应的给删掉,导致出错。