Is it a good pratice to not close the smartpart?

Jun 9, 2010 at 10:08 PM

Lets say I navigate to another SmartPart, should I always close the previous SmartPart before displaying the new ?

Coordinator
Jun 9, 2010 at 10:15 PM

There's no reason to close it, no.

Jun 10, 2010 at 1:54 PM
What about memory? Lets say I have lots of SmartPArt more than a 100. Keeping them alive wouldn't cause to much memory usage? Thanks
Coordinator
Jun 10, 2010 at 1:58 PM

Well obviously there is no one answer that is right for all scenarios.  In all my years of doing development I've never created an application on a mobile device that would use 100 SmartParts.  If you really have that many, and you're on hardware where you have memory pressures from it, then yes, maybe disposing some of them or reusing them makes sense.  I certainly wouldn't start worryng about it until it became a real issue rather than a theoretical one.

Jun 10, 2010 at 5:07 PM
Thanks for your answers. I'm just starting in the mobile development. So there is alot i don't know. The reason for not closing the smartpart would be a performance reason? So it doesn't have to recreated it each time?
Coordinator
Jun 10, 2010 at 6:08 PM

Yes, keeping it in memory gives you better perf for each time you want to show it.