0
public ref class ScriptEditor : public Form
{
public:
typedef map<UInt32, ScriptEditor^> AlMap;
static AlMap AllocationMap;
Form^ EditorForm;
RichTextBox^ EditorBox;
StatusBar^ EditorStatusBar;
StatusBarPanel^ StatusBarLineNo;
void Destroy() { EditorForm->Close(); }
ScriptEditor(unsigned int PosX, unsigned int PosY);
};
上述代碼引發錯誤C2039:'{dtor}':不是'System :: IDisposable'的成員。查看了解釋CLR如何管理內存的文章後,我完全迷失了方向。任何意見,擺脫它將不勝感激。我在C+++/CLI中的第一次嘗試不太順利。System :: IDisposable woes
我使用的地圖容器的CLR實現 - 必須有提到前面。無論如何,我會嘗試使用Dictionary類。 – shadeMe 2010-03-13 16:53:42
那麼,在鏈接文檔中有很好的描述,STL/CLR需要ScriptEditor來實現〜ScriptEditor()。但是,使用Dictionary <>。 – 2010-03-13 17:10:04
再一次,我沒有完整地發佈完整的代碼,因此我有錯。我確實在一點實現了析構函數,但是錯誤信息仍然存在。 – shadeMe 2010-03-14 01:39:06