Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   C++ (http://www.programmingforums.org/forum15.html)
-   -   wxWidgets and memory (http://www.programmingforums.org/showthread.php?t=13870)

rwm Aug 30th, 2007 10:26 AM

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!

DaWei Aug 30th, 2007 10:37 AM

You can explicitly code everything that wxWidgets does for you. Most people use it to avoid doing that.

rwm Aug 30th, 2007 10:43 AM

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! :D

rwm Aug 30th, 2007 10:46 AM

Oh, forgot, you can download the book "Cross-platform programming with wxWidgets" for free....

http://www.phptr.com/content/images/...73816_book.pdf

neato! :D

mrynit Aug 30th, 2007 11:00 AM

Quote:

Originally Posted by rwm (Post 132998)
I actually like the library, much simpler than windows API... But GUI programming overall, not a fan! :D

have you tried making gui's in java? it is cross platform and fairly easy to use. thanks for the pdf

DaWei Aug 30th, 2007 11:15 AM

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.

rwm Aug 30th, 2007 11:16 AM

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....

rwm Aug 30th, 2007 11:18 AM

Quote:

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.
hey, didnt see your post... sorry, what you mean?

DaWei Aug 30th, 2007 2:09 PM

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. ;)

rwm Aug 30th, 2007 3:44 PM

Ah well maybe that's just the "fanboy" in him ;)

:D


All times are GMT -5. The time now is 3:02 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC