What happens to private data?

Hello everybody,
This question is purely out of curiosity, but it just came to me:
Lets say you have a class that has some data and, say, methods "foo" and "bar" are the only ones to manipulate that data. I say this in a sense where that data would be useless, totally inaccessible, if those two methods were to be overridden. Now lets say they are. For some reason, some sub-class would need to implement the same functionality in some other way, overrides those methods and uses an entirely new set of data. Does the previous, private/protected data, get "shipped" with the child class anyway? Is there some kind of optimization to detect this situation and disregard the data as usable? Or is that not possible, for some reason? If you were facing a problem like that in your designs (ie, the class you are extending as not been written by you, so you either have to "play along" or you just don't know about it), how would you solve it?
I know that the GC could do it. So the main question is: does it?
Kind regards ;)
Fratelli

That's not very good design either. Make all your base classes with weak references so people can extend them, ignoring their fields, and allow those fields to be garbage collected? What if the superclass needs that one reference to keep the value? When you design a class, you should know whether you plan for it to be extended or not, and if the answer is yes, then you should know how it's meant to be extended. If there's a field that could reasonably be ignored by a subclass, then it shouldn't be there at all -- rather, you should provide a specific subclass using that field, so other subclasses can branch off the superclass that doesn't have it. If the field in question is integral to the functioning of the superclass... then unless a weak reference is part of the semantics of the superclass, it shouldn't use a weak reference, and if a subclass wants to use the superclass but ignore that field, then the subclass is being poorly designed. You can't compensate for unknown future bad design in advance, aside from just making it more difficult.

Similar Messages

  • HT204150 I have synced an iPhone 4S with iCloud - I now have a 5C to replace it. What happens to my data when I retire the 4S - does it need the original device to save my data?

    I have synced an iPhone 4S with iCloud - I now have a 5C to replace it. What happens to my data when I retire the 4S - does it need the original device to save my data?

    Welcome to the Apple community.
    Once you have restored your new phone from the backup of your old phone and ensured that everything is working correctly, you should first turn off "find my phone" on the old phone and then erase it, before you get rid of it.

  • HT4707 what happens to Keychain data when I move to iCloud?

    what happens to Keychain data when I move to iCloud? Can I still access Keychain passwords?

    Thanks Carolyn,
    And yes. Keychain does still work.
    But why-oh-why do Apple have to give contradictory information yet again in the sign up process? It seems they just want to cover their arses so much that they would rather give out misleading information, that something might go wrong, just in case it does, than tell us everything will be OK & then if we lose data, we, (Americans with a penchant for litigation), are automatically going to sue thier bollocks off.
    This happens so many times with pop-up warnings. I'm running two macs & an iphone and I very nearly didn't go for Lion & icloud and seriously considered going back to Windows. Only a chance conversation in an Apple store stopped me and made me persevere through the warnings.
    Cheers,
    Steve

  • What Happens To App Data With A Broken/Lost Pre?

    What happens to the data in my applications, like if I had a Quicken type app and I had to Full Erase or got a replacement Pre? I'm guessing that the app would re-download and all my data would be gone.
    Can anyone give me some insight as to what happens to app data when your loose or have to erase a WebOS device. And if I'm correct is there anyone working on a solution to backup app data?

    If you re-download the apps under a different ID, you'll lose all saved data.

  • What happens to encrypted data when the server is destroyed?

    Backups to tape are encrypted with a certificate. 
    But what happens if the backup server is destroyed? Do I lose all the backup data on those tapes?
    Can I backup the certificate or is it specific to that specific DPM server?
    In the case of a catastrophic datacenter failure, where everything is lost except the tapes and the certificate, what is the process for recovering the encrypted data?

    You can absolutely backup the certificates used for DPM encryption and you should store those somewhere safe (for example, burn to CD and put in a fireproof safe offsite somewhere secure in an encrypted file).
    This section of TechNet describes the process: http://technet.microsoft.com/en-us/library/jj628058.aspx
    If you had to recreate a DPM server to read the tapes then you'd need to the certificates in the correct certificate store on the DPM server, in addition you'd need to ensure you had the certificates for the certificate chain, if there is one, in the correct
    locations in the cert store.
    Once a cert expires, do not delete it from the DPM until all the tapes that have used that cert are no longer in use or have been overwritten.
    The data would need to be imported through the recovery section in DPM but you'd be able to read and recover the data if the certs were present. No cert = no recovery.

  • What happens to the data in apps that you choose not to backup with iCloud?

    Hi,
    I have a 64b iPad and a lot of the storage is used up with data stored inside apps. Some of these data stores are 10s of GB in size. Such as, I keep some videos on my iPad that I play with VLC player. When I upgraded the iPad to iOS5 and activated iCloud backup, it immediately told me there wasn't enough room to back up my iPad entirely. I turned off backing up certain apps, such as VLC.
    What happens to these apps? Are they still backed up during regular syncs with your Mac?

    when you plug into itunes you can backup to both locations (icloud and locally) just not a the same time. When you click on your phone in itunes you'll see this option
    click icloud then sync (will backup to icloud when you sync)
    afterwords
    click back to this computer and sync
    keep in mind that if icloud has a 5GB backup limite unless you upgrade it
    10GB — $20/year
    25GB — $40/year
    50GB — $100/year
    edit: forgot to say
    if you don't sync with itunes to the computer then whatever doesn't go to icloud is not backed up at all.

  • What happened to custom dates in iCal?

    Custom dates never made it to iPhone and iPad but it now seems to be changed in iCal. I used to be able to select "the first Tuesday of the month...(etc.)". Now I can only put in "Every 4 weeks". Not what I want. How hard is that to make it work? It used to work.

    danielfromduncanville wrote:
    What happened to custom ringtones in ios5?
    Make sure that your custom ringtones are NOT in your Music Library. They will not transfer or work if they are.
    The should only be in the RingTones Folder.

  • What happens to report data when data is deleted in cube

    Hi,
    We are deleting Complete data in Cube daily and do a fresh data load via process chain. So, my question is what happens when run a report based on the cube during period of deletion of data from cube.
    My question is does system will put old data some where untill new data comes in cube (or) complete deletion of data takes place and no data is displayed in report during that deletion period.
    Please let me know.
    Thanks
    Tony

    Hi Tony,
    As soon as data is deleted from the cube, Data will not be available for reporting. because for any reports data is fetched from Tables, for DSO they will fetch from Active table.
    So you will receive a message Data not found, if the data is deleted from Cube's table.
    Assign some points, if this is helpful.
    Rgs,
    I.R.K

  • What happens to versions data when files are deleted ?

    When working on a document with an application using autosave, I understand modifications are regularly saved together with the actual state of the file. When such file is dulicated, history and the different versions are not duplicated.
    My question is, what happens to the versions data if the original file is deleted and is the space used for all versions reclaimed ?
    Working with big documents on SSD disk could be a problem seems to me.
    Thanks for your comments.

    Hi Tony,
    As soon as data is deleted from the cube, Data will not be available for reporting. because for any reports data is fetched from Tables, for DSO they will fetch from Active table.
    So you will receive a message Data not found, if the data is deleted from Cube's table.
    Assign some points, if this is helpful.
    Rgs,
    I.R.K

  • How to rollback RBS and what happens to existing data

    Let's say I am using Remote Blog Storage (RBS) in one of my content database and I decide not to use anymore.
    1. How can I roll back RBS?
    2. What will happen to my data and how can I migrate it from RBS to how SharePoint/SQL Server stores it normally in database?

    There's a few blogs around with steps such as this one:
    https://alipka.wordpress.com/2010/06/19/how-to-disable-rbs-in-sharepoint-2010/
    I'd tackle it in several steps.
    Make sure that no new content is being externalised
    Move existing content back into the database
    Remove old connections
    Or i'd just try doing backup and restore operations for site collections to clean databases that don't have the RBS configured.

  • What happens after: "Erase data after ten failed passcode attempts"  ?

    What happens after data is erased from the iPhone after ten passcode attempts?
    Is it the same thing as Settings->General->Erase all content and settings ?
    Does the iPhone essentially becomes a permanent brick, or does the iPhone appear as a fresh device that just awaits reactivating?
    Thanks~!

    All the user data on your phone is encrypted. When 10 failed attempt occur, the phone just securely erases the encryption key (overwrites it multiple times), then reboots. Without the encryption key present, even though all the data is still there, it cannot be decrypted and read anymore. Its just a load of random bits, and useless. The phone will just go through it's 'factory default' setup and quick format the flash ready to be used again as if it was a completely blank brand-new phone. At no point during any of this process is the system partition (the area that stores ios4) touched, so there is no danger of the phone being "bricked".
    And even if the system partition was erased, you could still restore the phone using DFU mode. It's quite difficult to permanently brick an iPhone, you can recover from most problems.

  • HT5622 can i change my i cloud account for my i phone to match with my macpro? what happen to my data stored in my iphone can i transfer it my my macpro i cloud account specially my pictures

    can i change my i cloud account from my i phone to match with my macpro i cloud account? what will happen to my data (pictures) stored with the iphone i cloud? could it be transferred to my new macpro i cloud account?

    Why do you ask in the iWeb forum?

  • What happened to custom dates in calendar?

    There used to be a "custom" choice in calendar for 3rd Tuesday, etc.  I can't find it anymore. Does anyone know whether it still works, or where it moved?

    danielfromduncanville wrote:
    What happened to custom ringtones in ios5?
    Make sure that your custom ringtones are NOT in your Music Library. They will not transfer or work if they are.
    The should only be in the RingTones Folder.

  • What happens to unused data?

    I got my Galaxy Nexus last May, 2012. I went for the $50 device with new Verizon service sign-up. I liked the phone and the price, but I wanted to activate "tethering" to a notebook computer which I was using before starting Verizon service. If you don't have wi-fi hotspot, maybe it's because you have to order it after initiating service. I looked for the "tethering" feature when I signed-up, but didn't find it. Nevermind, I thought, I will get it later. When I ordered wi-fi hotspot later, I was sold a 3gb plan, in addition to my original 4gb plan, for total 7gb data, and for an extra $30/month cost. Okay, I was curious if I would use that much data. Last month I pushed my wireless use but just went over 4gb. I decided I don't really need 7gb data, and maybe I don't need wi-fi hotspot. I happen to have the Verizon mobile app, and looking at my data usage, I noticed a 4gb data plan with hotspot for $50. That's less than what I am paying for 7gb and I went for it. The app allows users to purchase available Verizon service features like the 4gb plan, which I did. The order got screwed-up, and I had to telephone customer service. I think I now have what I want. My issue with Verizon is it is not easy to find the best plan for my money. Why would any user purchase more data than needed? If it's true "unlimited" was canceled because hackers were re-selling excess wi-fi data, it is probably because some users were motivated by that reason. It does make one think.

    It is also possible what you "think" you are paying for is not what Verizon is selling.
    Think of it as a gym membership. You pay a monthly fee in order to use everything in that gym whether or not you actually even go 1 single time, every day or whether you only use 1 piece of equipment or 10 pieces of equipment. You don't pay for a month's membership and get to go UNTIL you have used every piece of equipment, your use of the gym expires at the end of the month whether or not you have used it at all or every day UNLESS you pay for another month. You don't get to use the gym any more next month because you did not make full use of it the previous month, you get to use it the exact same as your membership level indicates UNLESS you pay for a higher level of service.
    THIS is how Verizon thinks of its service. You pay a monthly fee to have access to a set amount of data/minutes/texts. Whether or not you use that amount is up to you. If you don't use it that much, you should rethink the allowances you have set for yourself. You can change them at any time.
    You can use ANY of it or you can use ALL of it, it is completely up to you. You can even incur additional fees if you go over your set usage, just like a gym where you can incur additional fees by utilizing services which are not included in your monthly membership payment.
    And you are right, I can't blame a guy for hoping.

  • What happened to my data?

    On the 25th of December(billing cycle) I deactivated a phone on my account before the cycle ended. I also changed my data plan from 6 gigs to 2 gigs. I then received an email on the 26th stating:
    Your calling plan has been changed
    Your calling plan change request has been completed forwireless number ending in -____.
    Your new plan and minutes allowance will begin on 12/26/2013, the first day of your next billing cycle.
    Thank you for choosing Verizon Wireless.
    Monitor Your Usage on My Verizon
    Yesterday December 27, at around 10:20 PM I headed to work, while driving I searched up a few recipes via Google Chrome, that's it. By around 11PM I had received 3 emails stating:
    1st email - 11:01PM Eastern Time
    Important Information About Your Data Usage
    The mobile number above has used approximately 75% of its data allowance for this month. The monthly data allowance will reset on the 25th.
    We have great tools to help you estimate, manage and track your usage.
    Estimate it! Use our data calculator to see how much data you might use. Go to verizonwireless.com/datacalculator
    Manage it! Compare recent months' data usage with Account Analysis in My Verizon.
    Track it! Use My Verizon Mobile or Dial #DATA (#3282) to get an estimate of the data used since your last bill.
    You can also manage your alert settings in My Verizon including adding recipients and opting out of specific alerts.
    Thank you for choosing Verizon Wireless.
    2nd email - 11:08PM
    Important Information About Your Data Usage
    The mobile number above has used approximately 90% of its data allowance for this month. The monthly data allowance will reset on the 25th.
    Run an Account Analysis in My Verizon to analyze your recent months' data usage and review your plan options.
    Don't forget, you can also manage your alert settings in MyVerizon including adding recipients and opting out of specific alerts.
    Thank you for choosing Verizon Wireless.
    3rd email - 11:12PM
    Important Information About Your Data Usage
    The mobile number above has used its data allowance for this month. You may be able to avoid data overage charges byincreasing your data allowance before the 24th and selecting that the change be backdated to the beginning of the current bill cycle.
    Your monthly data allowance will reset on the 25th.
    Don't forget, you can also manage your alert settings in MyVerizon including adding recipients and opting out of specific alerts.Thank you for choosing Verizon Wireless.
    What the **** happened?
    1. My billing cycle has changed.
    2. Lost all my data in under 24 hours, in less than an hour.
    3. That was my first time outside since I updated my account.
    4. I checked 'My Verizon Mobile', I am now passed my 2.00GB, currently at 2.04GB.
    5. What does prorate/prorated mean? In 'My Verizon Mobile' it states that "Your new plan allowance is prorated for this billing cycle." The VW Rep that I've spoken to over the phone didn't tell me anything about this.
    6. Going back to 4's issue. "Warning - Data Allowance Exceeded!" $10.00? For what? I browsed the web for a few seconds. I'm not paying for ****. I want my 2 gigs.
    7. Billing cycle ends on 01/25/2014 - Sucks that I have no data left.
    8. I'm ******. I wanted to call up a rep, but it's now 2:42 AM.
    So can someone please explain to me what on earth happened.
    Also, please tell me what does prorated means, and whether that's the problem or not.
    Thank you.

    Also, I just called Verizon Wireless and the rep told me that she couldn't do anything about it because it could have been my fault.(removed) that. She said my phone could have been backing up, or I could have been streaming music/movies. She said it all started around 10PM when I went outside. Here's the thing though, I told her I have VW's cloud backup service.. which doesn't backup anything since my 5 free gigs on the cloud is already filled. I also have Google Photos automatic upload/backup on.. which already has all my pictures stored. What about streaming? I don't stream movies(Netflix) when I go outside, only when I'm at home(wifi.) Music? I have Spotify for that, premium member. Even if it was streamed, all my data wouldn't have been up in under an hour. Downloads? I didn't download anything.
    I got this off VW's 'Choosing a Plan' page:
    2G Data
    1,200 emails
    8 hours of music - Even if I were to stream my music, it wouldn't have taken an hour to use up my data.
    4 hours of video - Same goes for the music.
    She told me VW can't do anything about it and that I'm just going to have to pay for it along with the $10 per overage fee for every 1gig.
    (removed) you, Verizon Wireless.
    Also 2gigs in under an hour doesn't make any sense!
    Comment edited as required by the Terms of Service.
    Message was edited by: Admin Moderator

Maybe you are looking for

  • Purchase Order condition isn't calculating the value of refundable tax

    Hello Experts,                       When i am inputting tax in invoice tab at item level footer in Purchase Order, and after that when i am calculating the taxable and the total amount the condition tab isn't displaying the tax value, the condition

  • Microsoft Office 2008 & other programs take forever to load & run

    Ever since I installed Snow Leopard on my laptop, my entire Microsoft Office 2008 suite takes forever to load and to operate. It also seems to have slowed down the processor for almost all other applications, especially Safari. I have Snow Leopard on

  • Trying to bring back records with and without email address

    I have a simple query where I am trying to pull back all of my active subscribers and their email addresses. Most of the subscribers do not have email address but I still want those subscribers in my results. I figure it is a simple join but I can no

  • REQ table is not populated

    Hello experts, in my IDM envt, when I submit request, REQ table never gets populated. All the requests can be seen in REQUEST table. Is it an issue or that's how it is designed in 11.1.1 ? can you please clarify ? thanks

  • PROBLEM: HP p2015 printing strange Characters

    In our office we have an HP 2015 that has started printing abnormal characters on the end pages of say, a 6 page document. The first three pages will be ok, and then the remaining three pages will have symbols and strange characters in replace of the