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

Pages: 1-

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 12:09

My head hurts.

Name: Anonymous 2008-09-22 13:10

You forgot to compile with -fexpert-trolling

Name: Anonymous 2008-09-22 13:10

It's been a while since I did something with wxWidgets, but don't widgets delete themselves automatically when you close/destroy the window?

Name: Anonymous 2008-09-22 13:30

>>4
Yeah, I just figured that out. The documentation alludes to this, but never (from what I can tell) explicitly says "If you use SetTopWindow, that window will be automatically deleted when it is closed."

Name: Anonymous 2008-09-22 17:22

>>5
It will. Don't worry about it.

Also your debugger should tell you if there are memory leaks, at least with some option. I code wxWidgets on VC++ and it does so by default, I think with the express version you have to add a few statements in your code. No clue about gdb etc.

Name: Anonymous 2008-09-22 19:45

>>6
If the debugger knows when there are memory leaks, why doesn't the language itself know and fix them?

Name: Anonymous 2008-09-22 19:50

>>7
Go back toJava part VIII, please.

Name: Anonymous 2008-09-22 20:09

>>7
Comical, isn't it?

Name: Anonymous 2008-09-23 0:46

Win32 > wxWidgets

None of that object shit.

in b4 NULL NULL etc.

Name: Anonymous 2008-09-23 6:23

>>10
In during NULL, NULL, NULL, 0, NULL, (DWORDPTRMEMHANDLE*) NULL

Name: Anonymous 2008-09-23 10:17

>>8
gb2penislickerforum

Name: Anonymous 2008-09-23 19:55

>>12
I will, along with my penis licker.

Name: Anonymous 2008-09-23 20:34

hWnd, lParam, wParam, lpwcszMsgFuck, lpcStpdObnxHungNotatBullshit, FGSFDS_USELESS_CONSTANT | FGSFDS_DEPRECATED_FEATURE, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL

Name: Ultimate Desu Machine 9000 !!4tCZGW1yibnzNNd 2008-09-23 20:40

0000111111111111000000000111111111111111111000000000001111111111000000000011111100000000000001111110
0000111111011111110000000111111111111111111000000111111100000011111110000011111100000000000001111110
0000111111000111111100000111111000000000000000011111100000000000011111100011111100000000000001111110
0000111111000000111110000111111000000000000000111100000000000000000011110011111100000000000001111110
0000111111000000011111000111111000000000000000111100000000000000000000000011111100000000000001111110
0000111111000000001111000111111000000000000000011111000000000000000000000011111100000000000001111110
0000111111000000000111100111111000000000000000000111111100000000000000000011111100000000000001111110
0000111111000000000011100111111111111110000000000000001111111111111100000011111100000000000001111110
0000111111000000000111100111111000000000000000000000000000000000001111000011111100000000000001111110
0000111111000000001111000111111000000000000000000000000000000000000011110011111100000000000001111110
0000111111000000011111000111111000000000000000000000000000000000000000110011111100000000000001111110
0000111111000000111110000111111000000000000000110000000000000000000001110011111100000000000001111110
0000111111000111111100000111111000000000000000011110000000000000011111100001111110000000000011111100
0000111111011111110000000111111111111111110000000011111000000000111100000000011111111111111111110000
0000111111111111000000000111111111111111110000000000001111111111110000000000000111111111111111000000

Name: Anonymous 2008-09-24 6:37

>>15
DESU

Name: Anonymous 2008-09-24 7:01

>>15,16
BACK TO /b/ PLEASE

Name: Anonymous 2008-09-24 8:11

>>17
DESU

Name: ​​​​​​​​​​ 2010-10-23 18:50

Name: Anonymous 2011-01-31 20:14

<-- check em dubz

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