February 23rd, 2013, 04:33 AM
Static vs dynamic allocation
My application will have several small input forms which will be rarely used and contain a limited number of objects. My question to you is: is it worth creating these forms statically (giving them their own unit) and have them hidden in the background even though they'll rarely be needed, or should I create them dynamically on the spot when they're being called and free them after use?
What's the most efficient way to approach this?
Thanks for the input.
February 23rd, 2013, 09:03 AM
I almost never opt to have the application autocreate all my secondary forms.
One thing to take into consideration, if you want your form to remember its previous state (last time your user used the form), then autocreating the form and hiding it would be better (don't confuse this with having the form remember its state the last time the application was run).
February 23rd, 2013, 04:46 PM
I agree with majlumbo.
Personally I store and retrieve any information about forms that I want the application
to "remember" to an XML configuration file.