Delete all pages in PagePanel

Is there a pages array for the PagePanel class or a built-in method that can be called to delete all of the pages in a PagePanel. As I believe it reduces CPU usage I think it is better to have a built-in method or a way of clearing out the array but if the only way of doing this is by looping through each page individually then I am happy with that. Maybe I am wrong about the clearance of arrays?

THANKS

Doubt it. Whether you run the loop or a library function runs this loop, the same amount of mostly negligible work would be done to remove the controls from the panel and window.

In general with UI programming, get it right first. If it’s slow, then benchmark and optimize, but only if it’s slow.