Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

wxWidgets question

Name: Anonymous 2008-09-22 12:05

Currently, my OnInit() function look like this:


{
    MainFrame *main = new MainFrame();

    main->Show(true);
    SetTopWindow(main);

    return true;
}


Concerned that there was probably a technical memory leak here, I moved MainFrame *main to private, and added an OnExit:


{
    delete main;
    return 0;
}


But when I do this, I get an access violation on closing. What's wrong with my code, /prog/?

Name: Anonymous 2008-09-22 19:50

>>7
Go back toJava part VIII, please.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List