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.

posted on 2013-01-18 10:56  yeahgis  阅读(437)  评论(0编辑  收藏  举报