Does repeated use of the same addSubView eat up memory?

Inside viewDidLoad I'm created an array of button objects. When I click on another button in my app, I'm looping through the array, placing the buttons in frames and adding them to the view with the following code:
[self.view addSubview:[buttonsArray objectAtIndex: i]];
[self.view bringSubviewToFront:[buttonsArray objectAtIndex: i]];
When testing on an iPhone, after a while an out of memory error occurs. I am wondering if it is perhaps because of the way I am doing this.
Would repeated occurrences of addSubview and bringSubViewToFriend gradually eat up memory? Or do these overwrite existing items I've previously added to the subview?
Would it be best if I do this just one time inside viewDidLoad and hide the buttons until needed?
Or after clicking on a button, is there something better I should do to release the memory used until needed again?
Does this sound like a likely cause of a memory problem?
Thanks,
doug

I'll check out the subviews property.
In the meantime, programmatically, how would I add the buttons to a single UIView as a container? That sounds very useful.
I did notice that for UIToolbar I could hide and unhide the entire UIToolbar at once with a single property setting of hidden to YES or NO. But I set up the UIToolbar in the Interface Builder.
It would be great to figure out how to add the buttons to a UIView. In fact, what I'd like to do is add them to a scrolling view container at some point.
I just haven't been able to figure out the syntax yet.
Thanks,
doug

Similar Messages

  • Repeated use of the same JTextField

    Does Java allow multi-use of JTextFields in multiple JPanels? What I'm trying to do in essence is I'm trying to click on a button that will allow a dialogue box to open. This dialogue box would contain a JTextField which I am also using (for the same purpose and information) elsewhere.
    Here's the scenario:
    you click on a button (say open account) and a dialogue box pops up to ask you which account to open. The JTextField I am using in the dialogue box would retain it's value when the account opens, though it is visible on the new window as well...
    If you know the answer to this, I would a preciate the help, thanks!
    Geyegeroffe

    considering that it's the same value in either
    container, does it matter if I make a reference? it
    should simply update the value wherever it was used
    last... correct?
    GeyeU can update the value by using setText method and the textfield can be added to different containers yet retaining the value. u have to keep on removing and adding the textfield between containers.
    May i know why u wanted the same textfield when infact u can create another one for another window and pass the string from the old textfield to the new textfield. That is the most simplest and effective job. what if many threads try to access the textfield from different classes. that sure would open the floodgates for a program to hang/freeze.

  • We are a creative design studio, we need to use apple mac pro server , so we can make more than a different user to use at the same time doing different activities, on different screens, is it possible?what is the max. no. of users that can work efficient

    we are a creative design studio, we need to use apple mac pro server , so we can make more than a different user to use at the same time doing different activities, on different screens, is it possible?what is the max. no. of users that can work efficient.
    Appreciate your support and if possible , how to do this?

    If you want to work with Mac OS X, you need one computer per simultaneous user.
    What you are describing, " Multiple simultaneous logins to a single computer" is not avialable on a regular Mac of any description, unless you decide to use Unix tools instead of Mac OS X.
    Server will happily store files for many, many users and provide them to multiple (up to hundreds) of computers at "near hard Drive" speeds over Gigabit Ethernet. It can make the File Sharing part easy.

  • Use System Proxy Settings - when this is selected in FF v3.6.6, does it adhere to the same local IE proxy setting? We use a pac file configured in "Use automatic configuration script."

    Does anyone know what Firefox looks at locally on the PC when the "Use System Proxy Settings" setting is selected? It appears to be the default setting, recently changed from "No Proxy" of versions past...
    Our company uses a pac file specified in IE under "Use automatic configuration script" - with this new default, does it adhere to the same setting in:
    [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings]

    I may be wrong but I think that the "Use System Proxy Settings" makes sense only on Linux and generally speaking "other OSes". As far as I know there is no generic proxy settings in Windows operating system.
    The one I know is in the registry part of Internet Explorer.
    So in my understanding in Windows, Use System Proxy Settings = No Proxy

  • Already signed in on ebay; then I go to either revise my item or sell and item, ebay will ask you to sign in again; using Firefox, the same screen keeps coming up, asking me to sign in. I then have to use IE . Deleting history does not help.

    Already signed in on ebay; then I go to either revise my item or sell and item, ebay will ask you to sign in again; using Firefox, the same screen keeps coming up, asking me to sign in. I then have to use IE . Deleting history does not help.

    # Yes, if you go to accounts.firefox.org, sign out, you will now be signed out.
    # Sign back in, and you will be asked to save the password you entered.
    # This will save the password and autocomplete if you have this option turned on.
    I am not exactly sure why the menu did not detect the password change or if it was stored incorrectly after you changed it? But after storing the correct password you can manage any duplicate passwords in the password manager.[[Password manager - Remember, delete and change saved passwords in Firefox]]

  • Error : Old and new exceptions cannot be used at the same time.

    HI ALL,
    i build a new exception class with message class and i want to replace the
    old exception that i had in the method ,what i did is delete the exception from the method
    signature and add the exception class .
    the problem is that when i try to activate the method i get error :
    Old and new exceptions cannot be used at the same time.
    CALL FUNCTION 'CALCULATE_HASH_FOR_CHAR'
          EXPORTING
            alg            = 'MD5'
            data           = iv_iss
          IMPORTING
            hash           = lv_issu
          EXCEPTIONS
            unknown_alg    = 1
            param_error    = 2
            internal_error = 3
            OTHERS         = 4.
        IF sy-subrc <> 0.
          RAISE EXCEPTION TYPE cx_user_mng EXPORTING
          textid = cx_user_mng=>wrong_isrs.
        ENDIF.
    I want to use the new exception class ,
    how can i avoid this error ?
    Best Regards
    Edited by: Joy Stpr on Jul 22, 2009 2:56 PM
    Edited by: Joy Stpr on Jul 22, 2009 3:16 PM

    Hi Joy,
    Check this link.
    [Old and New Exceptions Cannot be used at same time|Urgent problem, give me a hand;
    Old and new exceptions cannot be used the same time, what does this mean???
    Regards,
    Lakshman.

  • Currently, I have 5 iPads used for the same purpose. Since similar data /application is shared among all of them, is it alright for me "Backup" only 1 iPad. And in which case, if anything happens to any of the other iPads I can still recover the data

    Currently, I have 5 iPads used for the same purpose. Since the same data /application is shared among all of these iPads, is it alright for me "Backup" only 1 iPad instead of all 5?  And if anything happens to any my iPads which I have not backed up, I can restore it from the iPad where I have save the Backup. I am hoping by doing so, I will also be able to save some icloud storage space. Let me know if my question is still not so clear to you guys.  Thanks.

    Hello PeachY1234,
    If I understand correctly you'd like to save iCloud storage space by only backing up 1 of the 5 iPads to your account since they are all going to have very similar data and usage. You certainly can do that, but I do have to warn you that any unique data between them would be lost if you had to restore from that one backup made on another iPad so just keep that in mind. If you do need to restore in the future you can use this article to restore that iCloud backup:
    iCloud: Restore or set up your iOS device from iCloud
    Thank you for using Apple Support Communities.
    Cheers,
    Sterling

  • CC EULA 2.1.3 Two computers "used at the same time"

    In CC EULA 2.1.3 what does the phrase "used at the same time" mean?  Does the licensing system keep track of when I open and close AI (for example) so that when I put my desktop to sleep without closing the application it still considered "in use"?

    Thanks for the response.
    I have two licenses, sometimes both in use.  I occasionally need to be on the road and use my laptop.  I generally put my desktop to sleep and forget to close one of the Adobe applications I was using.  When I turn on my laptop and use any Adobe application it makes me sign out of all other computers on my account before using the laptop.  I then have to log in on both desktop computers before I can use them.
    I guess what my question really boils down to is this: How do they monitor and enforce the two computer rule? 
    Furthermore, how can I make sure that when I use my laptop I don't have to force both machines to log out?

  • Is there a conflict between Reader XI and Acrobat being used on the same computer?

    I downloaded the new Abode Reader XI. The computer in question has, also, Adobe Acrobat 7. Is there a conflict between them if used on the same computer? I can not open any PDFs and now the saved PDFs I had on the computer will not open and the icon shown on the desktop is gone. Please advise as I scan documents to this computer all the time and the person who needs to see them can not.

    I have Acrobat 8.1.6 and Reader XI on Win XP. Do these conflict? Should I get rid of the newer Reader?
    I'm having problems printing to the PDF print driver, locks up system, shows printer offline in spooler. I doubt problem is with driver itself because I can print a Test Page from it ok. But printing to Adobe PDF from Word & other apps locks up & never completes.
    There's an Exclamation Point next to Acrotray in Explorer. (see image)  What does this mean??
    Have tried Repair install of Acrobat twice.

  • My iPad and iPhone have the same syncing calendar but my Windows 7 PC with iCloud does not sync/show the same calendar...please help!

    My iPad and iPhone have the same syncing calendar but my Windows 7 PC with iCloud does not sync/show the same calendar...please help!

    iCloud will not sycn a calendar from an external source.  In order to use iCloud to sync it, you would have to move it to iCloud and stop using Google.  I know how to do that on a Mac, but I'm not sure how to do it on a PC.  If you're using Outlook, I suspect you export it as an .ics file to your desktop, then import it to the iCloud account in Outlook.  I'm sure you could use Google to find the specific steps.
    However, there's really no reason not to just use Google to sync your calendar across your devices.  Instead, just continue to use Goole calendar on all your devices and they should stay in sync.  Take a look at this video: http://www.youtube.com/watch?v=C0Jj0KFgbYI.

  • TS2972 how many IOS (iPads) can be used at the same time, and as a maximum, with home sharing?

    I would like to use multiple iPads at my residence and use home sharing for guests to watch content from my i-tunes, all on the the same network.
    what is the maximum number of IOS devices that can used at the same time, and be authorised on the "home sharing" at the same time?

    Thanks for a quick response!
    Under "Network adapters", here's what I found:
    - Broadcom 802.11g Network Adapter
    - 1394 Net Adapter
    - Marvell Yukon 88E8036 PCI-E Fast Ethernet Controler
    Two other wireless USB adapters are the same:
    - BLANC Mini Wireless USB adapter

  • How can i use in the same time input line and mic to recorder in several track whit SONAR

    I have beem recording only input line because SONAR 4 not recognized the mic in, Help me!!!.
    Thank you. Sorry for my english

    LIMACAR wrote:
    How can i use in the same time input line and mic to recorder in several track whit SONAR 4. I have beem recording only input line because SONAR 4 not recognized the mic in, Help me!!!.
    Thank you. Sorry for my english
    Depending on which soundcard you have there, but if your card is capable for
    ASIO -> activate I/O drivers on Sonar/Options/Audio/Drivers -tab (mic/line sources should be listed there --> activate) and select the mic or/and Line sources on tracks "I" - dialog
    WDM/KS -> use the Surround Mixer or windows recording controls for recording source selection (mic should be listed there)
    MME32 - > same w/ WDM/KS
    If you use Asio4All --> same w/ WDM/KS & MME32
    No mic and line source simultaenously w/ WDM/KS and MME32.
    You perhaps be able to do this w/ kX drivers.
    jutapa
    ADDED:
    You can also install modded version of Audigy 2 drivers/software but I have never done this w/ Li've! 5. so I can't be sure if you get ASIO support for your card.
    Here are the instruction --> http://www.tech-pc.co.uk/audigy-2.php
    jutapaMessage Edited by jutapa on 05-25-2006 02:48 PM

  • After the newest update, i can no longer type in traditional chinese ( pin yin), does anyone else have the same problem?

    after the newest update ( iso 7) , i can no longer type in traditional chinese ( pin yin), does anyone else have the same problem?

    I downloaded and tried EasyFind. It works but it took 30+ seconds to complete finding 3 files that are on One of my Five 25+ Gb partitions of my 130 Gb Seagate Cuda(Really 160 Gb, but my Sawtooth will only recognize 130) I figured that if I ever got a better box, I could reformat it to see the whole 160 Gb. So, as far as I can see, Spotlight's indexing scheme which finds the files instantly is probably preferable. Spot light allows you to rename your files from within it's app window. I've always thought that was pretty powerful. Could my doing so be causing me any issues? As i said it is the inability to Type in the Finder that seemed to be caused from changing file Extentions that were mis-written. Maybe it was a delayed reaction to my renaming files in the Spotlight app? I've done both on occasion.
    As for these .DS_Store files. Apparently you can NOT stop them from being written to any folder that you touch/open/view during a days session. But, as a function of the OS, are the essential to have in their respective folders Forever? I've looked at the .DS_Store terminator app briefly and assume that getting rid of these files won't hurt the regular operation of my OS. They will just be re-written if I ever have to go back to any particular folder again. But, apparently, some have said that if the plan on burning a CD or DVD of their data, they delete the .DS_Store files first and then do the burn.
    I'm thinking from your having suggested this tremination app that you suspect that my having all of these ,DS_Store files could be a situation where any of them could have become corrupted and terminating them regularly should be part of my regular maintenance.
    Does that sound like I'm understanding what I can do?
    TIA

  • How to use at the same time the audio sounds of a keyboard & the midi sounds with mainstage

    Hello! hope you can shed some light on my problem! I want to be able to use at the same time the real sounds of korg sv-1(stage keyboard, but it could be any stage piano with USB midi) and use other sounds from mainstage. Of course i switch between patches and sets with a footpedal so i can be quick with my changes of sounds so I try to keep my hands on the keys.
    My question is: Is there a way that one moment for example i have a silend patch (from mainstage) and the real sound i want passing through audio and the next moment silence from korg and the next patch a sound from mainstage? Or even combine them. I mean in general how am I able to integrate the sounds I prepared and organised in patches in mainstage with the beautiful piano & rhode sounds of my sv-1?
    thanx in advance for your response!

    Yes. To have a silent Mainstage patch, simply do not create any instrument channel strips. To have the SV-1 silent on a patch you should be able to set and save the volume for that patch to 0. As an alternative you could turn local off on the SV-1( this function will reset to local on after the SV-1 has been turned off). With local off you can determine with each Mainstage patch whether or not you want to transmit MIDI to the external instrument(SV-1) channel strip. If you have local on, be careful not to create a MIDI feedback/loop with the SV-1. This is a lot of info to digest at once, so take it slowly, step by step. Snapshots below are somewhat in order.
    Click on the cog wheel in the upper right corner of the channel strips section to get to this menu. Select add external instrument channel strip.
    The external channel instrument strip will look like this.
    Click on the MIDI output box to show the display below and choose your external keyboard destination(SV-1).
    In the channel strip inspector you can send patch changes to the SV-1.
    Here is where you select the MIDI input for routing MIDI to the SV-1. If want no SV-1 sound for this Mainstage patch, select none.
    You'll need to play with these parameters to get the desired results. Stepping through the MS patches with a footswitch can be done, too, but that can wait for now. Post another question when you master these steps.

  • HT204406 I have subscribed to match on iTunes and organized my music on my Mac Book.  Why does it not appear the same way on my iPad

    I would like my music to appear organized in the same way on my iPad as I have done it on my Mac Book.  (and on my iPhone as well)  Since it is in the cloud, why does it not appear the same way in all devices?

    The purpose of iTunes match is to make your music library available to all of your devices anywhere. It will sync Playlists, but no other type of organization you may have made.
    If you're having trouble, be sure you are logged into the same Apple ID on all devices but be sure to read this article and pay special attention to associating your devices with an Apple ID. There are important restrictions you should know about.

Maybe you are looking for