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

  • SEARCH
  • Home
  • 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 724677
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T06:15:00+00:00 2026-05-14T06:15:00+00:00

I have a pretty big view which is like 1000 x 1000. So I

  • 0

I have a pretty big view which is like 1000 x 1000. So I did clipToBounds = YES. Will this actually produce smaller bitmaps for the views?

  • 1 1 Answer
  • 2 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-14T06:15:01+00:00Added an answer on May 14, 2026 at 6:15 am

    I think probably not – you will still need to allocate the memory for the view, just not display it.

    You will probably get a very slight performance increase as UIKit knows more about what / what not to draw.

    However, you can answer this question yourself! Make a project that makes 1000 1000×1000 views and puts them on the screen. Then look at it’s memory usage in the profiler. Then do the same with clipToBounds set to YES and see it it’s changed!

    I predict that it won’t but I’d be interested in the results – if you do it, please post them up here!

    Thanks, Sam


    EDIT

    After the very reasonable comment by mystify, I’ve tested it by doing the following:

    1) Created a new XCode project – Window application

    2) Used the following code :

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    
    
        // Override point for customization after application launch
        [window setClipsToBounds:YES];
        [window makeKeyAndVisible];
    
        // Make some views
        for (int n = 0; n < 100000; ++n) {
            UIImageView *view = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"image.jpg"]];
            [view setFrame:CGRectMake(0, 0, 1000, 1000)];
            [window addSubview:view];
            [view release];
        }
    
        return YES;
    }
    

    3) Built it

    4) Ran it in Instruments – Object allocations from a fresh start of the simulator.

    As predicted, no change – it takes about 16MB with clipsToBounds set to either YES or NO on the window.

    However, there are still a few questions –

    a) I used a UIImageView to make sure that I had content that needed to be drawn for the entire of my view – the UI layer might optimize differently for different subclasses of UIView.

    b) I ran it in the simulator (I don’t have an iPhone handy, mine broke) – I’m 99% sure that it won’e be any different on a device but I also know that the simulator isn’t 100% accurate with memory leaks so it’s probably a good idea to test on a device as well.

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

Sidebar

Related Questions

I have been trying to serialize a pretty big object. This object uses dictionaries
I have some pretty big xml files which used for scheduled import. I use
I have a pretty big JavaScript file here which I want to embed into
I have a pretty big data entry form which has many text fields ,
I have a pretty big problem with my TabHost. Although I have declared all
I have a very strange situation. I´m working on a pretty big Java application
I have an image on a webpage. It's a pretty big image, however. It's
I'm here to get some information. We have a product thats pretty big and
I have pretty simple jquery code : $(document).ready(function(){ $('img.marqFl').on({ mouseenter: function() { $(this).animate({height: 300},
I have a pretty big table where I want to get certain rows by

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.