![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Professional Programmer
Join Date: Jan 2007
Location: Cape Town
Posts: 291
Rep Power: 2
![]() |
wxWidgets and memory
hey!
i was just wondering about wxWidgets, i've started reading tuts etc and ive noticed that most of the apps included leak memory... i was wondering if theres any steps to go through to avoid memory leaks... thanks! oh, is there a way i can explicitly code the main function rather than use the IMPLEMENT_APP macro, ive though about looking at the macro decls, but it sounds like a pain! |
|
|
|
|
|
#2 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
You can explicitly code everything that wxWidgets does for you. Most people use it to avoid doing that.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#3 |
|
Professional Programmer
Join Date: Jan 2007
Location: Cape Town
Posts: 291
Rep Power: 2
![]() |
Thanks DaWei!
Ah well thats cool... i've always hated macro stuff! Well, with regard to the memory leaks, I guess what I could do is store pointers to all wx elements I allocate on the heap, and delete those myself... But im not sure what wxWidgets does with its objects - whether it frees the heap objects when destroyed, or whether i must do it by hand... Still looking through the docs... I actually like the library, much simpler than windows API... But GUI programming overall, not a fan! ![]() |
|
|
|
|
|
#4 |
|
Professional Programmer
Join Date: Jan 2007
Location: Cape Town
Posts: 291
Rep Power: 2
![]() |
Oh, forgot, you can download the book "Cross-platform programming with wxWidgets" for free....
http://www.phptr.com/content/images/...73816_book.pdf neato! ![]() |
|
|
|
|
|
#5 |
|
Hobbyist Programmer
|
have you tried making gui's in java? it is cross platform and fairly easy to use. thanks for the pdf
__________________
i dont know much about programming but i try to help |
|
|
|
|
|
#6 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Yeah, but buying an entire application, GUI and all, means you don't have to do ANY programming in ANY language. Can't beat that for easy.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#7 |
|
Professional Programmer
Join Date: Jan 2007
Location: Cape Town
Posts: 291
Rep Power: 2
![]() |
hey man!
ive actually started learning java for htat exact reason... the cross-platform is the best thing about java i feel... maybe a little slower, but much faster to write apps... java is a nice language! still need to get more familiar with the syntax.... |
|
|
|
|
|
#8 | |
|
Professional Programmer
Join Date: Jan 2007
Location: Cape Town
Posts: 291
Rep Power: 2
![]() |
Quote:
|
|
|
|
|
|
|
#9 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Well, you ask a question in the C++ forum, a guy recommends Java. I just thought it would be as helpful to you for me to recommend doing nothing at all.
![]()
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#10 |
|
Professional Programmer
Join Date: Jan 2007
Location: Cape Town
Posts: 291
Rep Power: 2
![]() |
Ah well maybe that's just the "fanboy" in him
![]() ![]() |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|