Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6328867
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T17:32:26+00:00 2026-05-24T17:32:26+00:00

I have a magazine Ipad app that dynamically adds/removes webviews from a scrollview to

  • 0

I have a magazine Ipad app that dynamically adds/removes webviews from a scrollview to keep the memory usage low. For example, I have 3 view containers, and in each one I can remove existing children…

foreach (UIView subv in targetView.Subviews) {
                foreach (UIView subsubv in subv.Subviews) {
                    subsubv.RemoveFromSuperview();
                    subsubv.Dispose();
                }   
                subv.RemoveFromSuperview();
                subv.Dispose();
            }

and then add a new Web subview component (or scrollview with webviews) to the container.
I added the second level of children deletion, but there is probably another level in some cases. The emulator is perfect, but on the IPad, the memory usage just increases until it crashes with a low memory exception.
so…..

i) Does monotouch destroy a UIView with all nested children automatically?

ii) Instruments is not showing any memory leaks, what is the best way to debug this?

thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T17:32:27+00:00Added an answer on May 24, 2026 at 5:32 pm

    If there are no more references to your UIView then it should get GC’d. A quick way to find out if your object was collected is to create a class that inherits from UIView (or whatever class you’re using) then create a finalizer/destructor for the class. In the finalizer do a console write.

    ~MyView()
    {
        Console.WriteLine("MyView: finalized");
    }
    

    When you run your program make sure you see this being written to the console when you expect the object to be collected. In my experience, the simulator collects the objects almost as instantly as the object looses it’s last reference. On the device it may not be as quick.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm developing a full-screen web app for an iPad that will have a series
I have a Hindi magazine website hosted on Joomla. Though helpful from publishing point
We have developed a magazine style app for a client. Even though we're pretty
I have created an online magazine (that I hope will take off someday) using
I have an application that manages multiple magazine PDFs on the hard drive. I
I have a project that adds elements to an AutoCad drawing. I noticed that
I have a new web app that is packaged as a WAR as part
I have problem with return statment >.< I want to store all magazine names
I have a few classes: Article ------- Content ID Magazine -------- Name Code And
I have to create 2 tables: Magazine ( 10 millions of rows with these

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.