cmGrPlot.c: Changed op->userPtr release from _cmGrPlotObjDelete() to _cmGrPlotObjDestroy().

This commit is contained in:
kevin 2013-01-30 20:29:23 -08:00
parent 1e9308bedc
commit 7777e82921

View File

@ -103,12 +103,6 @@ cmGrPlRC_t _cmGrPlotObjDelete( cmGrPlotObj_t* op )
if( cmGrObjDestroy( op->grH, &op->grObjH ) != kOkGrRC ) if( cmGrObjDestroy( op->grH, &op->grObjH ) != kOkGrRC )
return cmErrMsg( &p->err, kGrFailGrPlRC, "Delete failed on the object label='%s' id=%i\n",cmStringNullGuard( op->label ), cmGrObjId(op->grObjH) ); return cmErrMsg( &p->err, kGrFailGrPlRC, "Delete failed on the object label='%s' id=%i\n",cmStringNullGuard( op->label ), cmGrObjId(op->grObjH) );
if( op->userByteCnt != 0 )
{
cmMemFree(op->userPtr);
op->userByteCnt = 0;
}
return kOkGrPlRC; return kOkGrPlRC;
} }
@ -337,6 +331,13 @@ void _cmGrPlotObjDestroy( cmGrObjFuncArgs_t* args )
_cmGrPlotObjCb(op,kDestroyedCbSelGrPlId,0); _cmGrPlotObjCb(op,kDestroyedCbSelGrPlId,0);
_cmGrPlotObjUnlink( op ); _cmGrPlotObjUnlink( op );
if( op->userByteCnt != 0 )
{
cmMemFree(op->userPtr);
op->userByteCnt = 0;
}
cmMemFree(op->label); cmMemFree(op->label);
cmMemFree(op); cmMemFree(op);
} }