Many windows in memory?

Just starting out? Need help? Post your questions and find answers here.
User avatar
Nexus100
User
User
Posts: 55
Joined: Tue Feb 16, 2010 9:40 pm
Location: Essex, UK

Many windows in memory?

Post by Nexus100 »

Hi Coders, Thanks in advance :wink:

My application has quite a few windows that are used which is all fine. I was just wondering which is the best way to 'use' them.

Is it better to create all the windows in one go (as invisible) and then just show them as required, or when needed, create them then and then get rid of them again when not needed?

Just thinking about memory really, if it could cause a problem. Oh by the way I will have about 15 windows in my application!


Thanks
All watched over by MACHINES..I am little more than #DigitalPlankton
User avatar
luis
Addict
Addict
Posts: 3895
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

Re: Many windows in memory?

Post by luis »

Normally you create the window when you need it.
Usually there is no reason to keep 1 window visible and 14 hidden just because you could use them later :)
A window even if hidden has a cost in term or resources (memory, cpu, gdi objects, and so on).
So unless you have a valid reason I would suggest to create/destroy them as needed.
"Have you tried turning it off and on again ?"
MachineCode
Addict
Addict
Posts: 1482
Joined: Tue Feb 22, 2011 1:16 pm

Re: Many windows in memory?

Post by MachineCode »

luis wrote:unless you have a valid reason I would suggest to create/destroy them as needed.
+1
Microsoft Visual Basic only lasted 7 short years: 1991 to 1998.
PureBasic: Born in 1998 and still going strong to this very day!
Post Reply