Crashed when delete OGRSpatialReference objects!

Crashed when delete OGRSpatialReference objects!

OGRSpatialReference* oSRS = new OGRSpatialReference();
oSRS->SetFromUserInput(constChrPtr);
{
      ...  
}
delete oSRS;//crashed here!
//OSRDestroySpatialReference(oSRS) ;//also crashed!

//why?

/*Some one say that  may be there are defects in the destructor of this class or the const char* parameter may not properly used here?*/

 Similar problem can be referenced here.