Forum Xamarin.Forms

Tabbed Page and memory usage

stuart_Astuart_A Member ✭✭

How is memory handled with tabbed pages?

Are all the child elements created fully and held in memory, or are they only instantiated when brought into view?

I have a project with some data that needs to be displayed in a tabbed page format, however there could be up to 50 tabs, each with quite a lot of data to display. There are concerns that there will be high memory usage issues if the tabs are all created at once and sit there waiting to be seen.

I'd be grateful for any info if anyone knows. Thanks!


  • stuart_Astuart_A Member ✭✭

    Done a bit of research and it seems pages only go into memory when they're in view.

    Some aspects are device dependent, e.g. Android stores rendered versions of about 3 pages to the left and right of the one you're currently on, and persists all page data so the view is current when you come back to it, even if the render was disposed of.

    I just tested a TabbedPage view with 100 tabs containing relatively large pages. Memory sat at <200mb and never varied, no matter how many tabs I moved around to.

    All good!

Sign In or Register to comment.