我在一个容器内有几张图像正在动画,我需要在动画结束后将Grid它们删除以节省内存。Grid
storyboard->Completed += ref new EventHandler<Object^> 
   ([this,birthImage,&index](Object^ sender, Object^ e) {
        mainGrid->Children->IndexOf (myImage,  &index);
        mainGrid->Children->RemoveAt  (index);
    });
不幸的是,我不能遵循这个建议和使用mainGrid->Chilren->Remove(myImage),因为这种方法仅适用于 C# 而不适用于 C++/CX
被迫使用IndexOf然后RemoveAt导致并发问题。
我需要一种解决方案来从 C++/CX 中的视图层次结构中删除对象
在 iOS 世界中可以通过单曲完成的事情:  [object removeFromSuperView];