System::IDisposable woes

Posted by shadeMe on Stack Overflow See other posts from Stack Overflow or by shadeMe
Published on 2010-03-13T11:54:06Z Indexed on 2010/03/13 11:55 UTC
Read the original article Hit count: 303

Filed under:
|
|
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);
};

The above code throws an Error C2039: '{dtor}' : is not a member of 'System::IDisposable'. I'm quite lost after having looked into articles that explain how the CLR manages memory. Any advice on getting rid of it would be appreciated. My first dabble in C+++/CLI isn't going too well.

© Stack Overflow or respective owner

Related posts about c++-cli

Related posts about dispose