我的构造函数是下一个
ScaperEngine::ScaperEngine(GrabberType grabberType, bool timing) {
switch (grabberType)
{
case GrabberType::DepthSenseGrabber:
this->interface = new pcl::DepthSenseGrabber("");
break;
default:
throw new std::exception("Grabber type wasn't chosen correctly");
break;
}
executionPipeline = new ExecutionPipeline();
executionPipeline->setTiming(timing);
}
然后我有一些代码,比如:
void ScaperEngine::StartPipeline()
{
IPCLNormalCalculator* normalCalculator = new PCLNormalCalculator(normalCalcMaxDepthChangeFactor, normalSmoothingSize);
executionPipeline->SetPCLNormalCalculator(normalCalculator);
最奇怪的是,构造函数正在以正确的方式构建executionPipeline,将其放置在内存中的0x0000020ef385e830中,但当我的c#托管代码调用StartPipeline时,executionPipeline地址更改为0xCDCDCDCD,在快速观察中,以下文本显示其变量
<Unable to read memory>
.
谁知道发生了什么事?
非常感谢。