C++/CLI 内 delete 释放内存的问题.
using namespace System;public ref struct APP{ String^ TheString; APP(String^ inString) { TheString = inString; }};public ref class BPP{public: property APP^ TheAPP;public: BPP(APP^ inAPP) { TheAPP = inAPP; }};public ref class CPP{public: property APP^ TheAPP;public: CPP(APP^ inAPP) { TheAPP = inAPP; }};int main(){ APP^ app = gcnew APP("Weird."); CPP^ cpp = gcnew CPP(app); delete cpp; Console::WriteLine(cpp->TheAPP->TheString); Console::Read(); return 0;}