well, i make no idea why this error is happening...
I have basically this code:
1 2 3 4 5 6 7 8 9 10 11 12
vector<char*> ListParam;
temp->classe = indiceLexClass;
while(v){
c_Name_Decl* n = v->nameDeclaration;
if(n){
char* aux = getType(n->type);
ListParam.push_back(aux);
}
v = v->next;
}
temp->paramMethod.swap(ListParam);
it works nicely, but when i was making a debug, in the end of the method, it calls the deconstructor of the vector, and i get a segmentation fault on this line: 86 { ::operatordelete(__p); }
on the new_allocator.h
anyone knows what am i doing wrong to happen this error?
edit: well, the main problem is that the "temp" is an structure that i initializate with malloc, and this structure has a vector, and it doesnt initializate, so it happen this error...
how do i fix this?