次のコードはvtkAbstractTransformのコードです。私のアプリケーションはこの関数で壊れていますが、このコードは安全ですか?Delete関数を呼び出した後、vtkObjectのメンバー関数を呼び出すことは安全ですか?
void vtkTransformConcatenation::Concatenate(const double elements[16])
{
// concatenate the matrix with either the Pre- or PostMatrix
if (this->PreMultiplyFlag)
{
if (this->PreMatrix == NULL)
{
// add the matrix to the concatenation
vtkSimpleTransform *mtrans = vtkSimpleTransform::New();
this->Concatenate(mtrans);
mtrans->Delete(); // call Delete on mtrans
this->PreMatrixTransform = mtrans;
this->PreMatrix = mtrans->GetMatrix();
}
vtkMatrix4x4::Multiply4x4(*this->PreMatrix->Element, elements,
*this->PreMatrix->Element); // My application crushed here.
...
} }