Why can't local references be cached ?

Hi,
I read that the local references created during the lifetime of a native method cannot be cached and used in another lifetime of the native method. I don't understand why they can't be cached. I know that the VM creates a registry of local references, which is deleted once the lifetime of a native method is over, thereby allowing the objects referred by those local references be eligible for garbage collection. But then if a local reference is cached to some global/static variable, then the object referenced cannot be GCed. Hence we should be able to use that cached reference in a later execution of the native method too. i.e., Even though the local reference of the eariler exceution was freed, since we have cached its value (which I assume is a sort of pointer to the actual object), we should be able to use the cached reference. If not, can anyone please explain why this does not work like that ?
Thanks.

I don't want global reference. But I just wanted to understand why local references can't be cached. Though I had read what all you said above, before posting my question, the answer somehow occurred to me while I was reading your reply. So, thanks.
I think the cruical point here is that, the JVM is not aware of the copies of the local references. It does not know and care how many copies of local references we (JNI programmers) make at the JNI level.

Similar Messages

  • Why can't I increase the cache size in FF 4?

    OK, first of all, to be honest I really don't like FF 4. I see absolutely no advantages over the previous versions and I can't find anything to like about FF 4..
    One big and annoying factor (besides the how UI and layout) is why can't I increase the cache size?
    If I choose to manage it myself and override what the developers did, I can go to 1024 and that's it. If I want 5GB of cache, I'm out of luck because some coded decides how I want to manage my disk space? They're kidding, right?
    What the heck is the matter with these guys?
    This thing is so bad that I've resisted upgrading, I didn't have a choice when I upgraded to Ubuntu 11.04, it came with the package.. Yuk... I've been a FF user since late 2003 or early 2004... I'm about to part ways with this thing if they don't fix it...Even IE sucks less than this thing....
    None of my Windows machines are going to get 4 loaded if I can help it.. About 1 million people agree with me...

    correction.. It's not a million.. it's legion at this point..
    Google "I hate FF 4" and you'll get 40,900,000 results... I don't trust Google further than I can throw them, but 41 million people complaining about this thing? What a freakin travesty...

  • Why can historyFrame.html not be cached?

    Hi all,
    Why  does historyFrame.html use the no-cache pragma?
    I would like to save a roundtrip if possible. Currently it's always requested ( albeit with a 304 answer).
    Couldn't I ensure that always the newest veryion is loader by changing the  filename each time it's updated?
    Regards,
    Markus

    I don't want global reference. But I just wanted to understand why local references can't be cached. Though I had read what all you said above, before posting my question, the answer somehow occurred to me while I was reading your reply. So, thanks.
    I think the cruical point here is that, the JVM is not aware of the copies of the local references. It does not know and care how many copies of local references we (JNI programmers) make at the JNI level.

  • Why can't I delete some cache items in Safari preferences?

    Safari>Preferences>Privacy>Details: Several cache items return right after they are deleted. I then went to Safari>Preferences>Advanced>placed check in box for "Show Develop menu in menu bar". But that menu does not show up in menu bar. If I close out and relaunch Safari, the unwanted cache items are gone from the Privacy Details. Even though the Develop menu never appeared, if I then go back to Advanced and uncheck the Develop menu box, those same "deleted" cache items return to the Privacy Details list. What if I don't want to delete some, but not all, the cache items? Why isn't the Develop menu appearing in the Safari menu bar? Is deleting cache items an all-or-none choice?

    You're not the only one experiencing such problems.
    Just installed Lion - and in Safari the ability to block cookies does not work at all, either in selecting 'from third parties and advertisers' or 'always'. Likewise, in selecting to 'remove all website data' such information repopulates within a couple of seconds.
    I am not at all at happy with this situation. If anyone has a solution, do share.

  • Why can't I reference data from a cell in file "A" to a cell in File "B"

    I would like to have a master file, that contains multiple tabs and many data tables, look ups etc.
    From this file, I would like to create many "sub" files, that contain only the relevant information for the person receiving that specific file.
    I know this is possible in Windows (sorry for swearing) but I can't get it to work in Numbers.
    I do not want to send out copies of the Master File, as it contains sensitive information.
    Can anyone help please?

    Hi Simontown,
    While you can link docs in excel I believe that sending only a sub file would result in broken links. In Numbers you can skip that step because you can't link the docs to begin with.
    If you are only needed to share the info in a tab you can use the print dialogue to save a pdf of any sheet. If you try to export a pdf from the file menu you will be sending the entire document.
    Another approach would be to create your sub-files as separate sheets that each contain a table that imports all the data needed for that sub file. In order to send the file you would first need to copy the info in that data table and "paste formula results" back in place. You could then select all the tables, copy and paste into a new document. This could be automated with a script. Any changes made to it would not reflect back to your original.
    quinn

  • Why can I cache method & field ids but not class?

    In my efforts to understand JNI, I've been making heavy use of http://java.sun.com/docs/books/jni/.
    I'm having trouble reconciling some of the points it makes with regard to caching; in particular, section 4.4.1 has an example of caching a jmethodID in MyNewString().
    I don't understand why this is valid, but the example in 5.5.1 which caches the jclass is invalid.
    After all, these are both simply jobjects in the end, and isn't the jmethodID cached in 4.4.1 based off the jclass found the first time? Doesn't that become invalid when the jclass becomes invalid?
    Thanks,
    : jay

    The point the author of that book is trying to make is that caching JNI local references of such data like Java method IDs and classes is not valid across successive JNI calls. If you want to cache something the first time you load it and reuse it later, create a global reference via NewGlobalRef(), make this your cached variable, and delete the local reference automatically obtained from the JVM when you first asked for that something. Then you can refer to that cached variable all you want.
    Also beware of trying to use references across threads - this is illegal in JNI. (You might want to reread chatper 5 for this and more. My opinion is the book "Essential JNI" is a bit better though not up to date either.)
    - Chris

  • Why can´t i change language inside PsCC from Danish to English? Instead of going into Program:Adobe. Locales: rename file from .tw10428.dat into tw10428.bat file??

    Why can´t i change language inside PsCC from Danish to English? Instead of going into Program:Adobe. Locales: rename file from .tw10428.dat into tw10428.bat file??

    Creative Cloud Help / Adjust the install language | Creative Cloud applications | CCM -
    http://helpx.adobe.com/creative-cloud/kb/change-installed-language.html

  • What is local storage? Why can't I get this app?

    So I'm trying to get the sims free play app on my ipod4g. It requires 569MB. So I click download and it says I do not have enough local storage. Which I clear do cause I just deleted almost everything off my iPod. I have 1.0GB of free storage left. I don't get it??? Why can't I get the app???

    You do NOT have enough space.  Most apps require 2 or 3 thimes the space required in order to install the app.
    You will need 1.2 - 1.8 gb or so free

  • Why can't I use the 16GB DDR3 System Memory (2 Dimm) with 24GB flash Hard Drive Acceleration Cache?

    I tried to customize the Envy 15t but I can't proceed on upgrading the following.
    Error
    24GB SSD Acceleration Cache requires purchase only up to 8GB System Memory. 
    Why can't I use the 16GB DDR3 System Memory (2 Dimm) with 24GB flash Hard Drive Acceleration Cache?
    Can HP explain this to me? or any one? please

    Hi,
    The 24Gb cache drive will store manything and normally it will need at least twice the size (capacity) of RAM. Double 16Gb is 32Gb therefore 24Gb is not big enough.
    Regards.
    BH
    **Click the KUDOS thumb up on the left to say 'Thanks'**
    Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem.

  • What does this error mean and why can I not find a reference to it ?

    In my continuing saga to get the type of backups I want our new Basis
    Admin had me use the brarchive option -ds  to brbackup
    brbackup -u / -p init$.sap -t online -m full -c -a -ds
    the brarchive option being -ds
    when the above was executed it gave the error
    BR0197E Chained start not supported for '-ds'
    I can find no reference to BR0197E anywhere
    -pete

    Hi,
    Found it as an "Info" message, not "Error". But it seems your case:
    <i>BR197I Chained start not supported for '%s'
    Explanation: A BRBACKUP and BRARCHIVE backup in a single run is not supported for all combinations of parameters or options (for example, not for backups to disk with backup_dev_type = disk ).
    Program response: The BRBACKUP/BRARCHIVE run terminates.
    User action: Do not use the parameter or option in the message for the chained start.</i>
    Regards,
    JC Llanes.

  • Why can't a backing-map-scheme be specified in caching-schemes?

    Most other types of schemes except backing-map-scheme can be specified in the caching-schemes section of the cache configuration XML file and after that be reused in other scheme definitions. What is the motivation for excluding the backing-map-scheme?
    /Magnus

    Hi Magnus,
    you can specify an "abstract" service-type scheme (e.g. distributed-scheme) containing the backing map scheme instead of the backing map scheme itself.
    I know it is not as flexible as having a backing map scheme separately, but it is almost as good.
    Best regards,
    Robert

  • Why Can't we Get Broadband in our Home when all our neighbours have it!!!!

    I contacted eircom on Wednesday last, 1 July in order to request broadband be installed in my home. I called at 17.42 and the call lasted 29.16 mins.  I explained to your sales representative, Louise Doolan, that I had no telephone line in the home at the present time, but had had one approximately 10 years ago.  I also explained to her that in April of last year I had contacted eircom about installing broadband in our home and that there had been an issue at the time involving the reconnection and supply of eFibre, but that the issue was ultimately resolved.  Unfortunately, at that time, I mistakenly understood that we were out of contract with our current broadband provider when in fact this was not the case and we ultimately had to cancel our order during the cooling off period.  Louise informed me that my old telephone number had been reissued to a new address and that a new line would have to be connected.  She informed me that she would call me back within 24 hours as the line was showing that our address did not qualify for broadband.  I did not hear from her again. On 3 July at 10.42 I telephoned 1901, as per Louise's instructions, and spoke with, I think, Mairead.  She informed me that from what she could see, the line was still not live and said that she would re-request the line set up. I was on the telephone with her at that time for 14.55 mins.  Mairead informed me that she was not in the office over the weekend, but that she would follow the call up for me on Monday and assured me that she would call me back.  I have still not heard from Mairead. On Monday, 6 July @ 14.22 I telephoned customer care again to follow up on the order, a call which ultimately lasted 31.28 mins.  I did not catch the name of the person I originally spoke with and he informed me that broadband was not available on my phone line and that that was it.  I said that I was not satisfied with that answer and requested that he put me through to someone who could explain to me why broadband was not available at my home.  He transferred me to a technical team and, if I correctly recall, I spoke with Adrian.  Up until this time I had not been provided with a telephone number, account number or reference number.  Adrian explained to me that he was a technical adviser to people with broadband already installed in their homes and was unable to help me.  He suggested I borrow a telephone from a house, install it in my home, ring my mobile and that I would then know my telephone number.  I was of the opinion that this was a far fetched way to get my telephone number and he ultimately transferred me to Harry in Accounts & Billing, Customer Care, Dublin.  Harry explained that he and his colleagues could see no reason why broadband was not available on my telephone line and said he would transfer the matter to the escalations department and would expect to hear back from them within 24 hours.  I asked would he ring me back within 24 hours and he said that he could not guarantee that, it may be within 48 hours.  I have not heard back from Harry. On 7 July, 2015 @ 16.32 I telephoned customer care yet again.  I spoke with Betty in the Dublin Office.  I explained all of the above to Betty and she informed me that from what she could see on screen, there was no reply as yet from escalations and that she would re submit the escalation request.  I told her that I would call back again.  This telephone call lasted 5.29 mins. This morning at approximately 11 am (as I was in work and called from our landline due to a poor mobile signal in my office) I called 1901 again.  I was put through to the Cork office and spoke with a young girl, whose name I cannot recall, but I think may have been Aoife.  She said that she could not see any resolution on the file, but that as 48 hours had not yet passed from the first escalation request, perhaps I should call back later.  I told her I would. I telephoned again at 18.48 this evening, a call which ultimately lasted 51.36 minutes.  As luck would have it I was answered by Betty, with whom I had previously spoken, in the Customer Care, Dublin Office.  I briefly outlined the above to Betty and asked her for an update on my order.  She explained to me that she tried the line again and that it was still not showing up as being available for broadband and that I would be unable to avail of same. I asked Betty for a more satisfactory reason as to why exactly I could not get broadband. I explained to her that there is an eircom exchange outside my garden, that the house itself is only 12 years old, that the house was built at the same time as my neighbour’s houses, all of whom had their lines supplied at the same time and several of whom have eircom broadband without issue.  My next door neighbour has eFibre broadband.  Our houses were built and wired at the same time. It is beyond reason to me that his home can have broadband supplied and my home cannot.  I do not live on the top of a mountain miles from civilisation.  I do not live on a remote island.  I live in a housing estate in Blessington, 25 miles from Dublin.  As Betty could not provide me with a satisfactory answer, I requested that she transfer me to her manager, or Team Leader, as it is known.  I was on hold for several minutes.  Betty came back on the phone and explained to me that her team leader said that nothing could be done unfortunately. I once again explained to Betty that, given that I was told one year ago that broadband could be supplied to my home, I would very much like to know what supernatural event occurred in the meantime that rendered this now impossible. I explained to Betty that I understand that she could not explain the matter further and that, as I would like a more reasoned explanation than “we can’t provide you with broadband at the moment, sorry”, I would like to speak to someone further up the line and once again requested that she transfer me to her team leader.  I was put on hold once again and, once again, Betty came back on the line and said that her team leader would not take the call as nothing could be gained from it and that nothing could be done at the time.  As you can imagine, the fact that this comedy has been carried out over now 1 week with not just one, but six telephone calls not being returned by any of your representatives, I felt it was not an unreasonable request to speak to somebody further up the line.  I explained to Betty that I appreciated her assistance and that I was not put out by her manner, but that I found her team leader’s refusal to accept my call extremely ill mannered and discourteous. I asked her for her team leader’s name and for her surname and informed her that I was making a formal complaint against her team leader.  She advised me that she could not give out that information without her team leader’s consent and I requested that she advise him or her of same, request that the name be released and relay my disappointment and disgust at the manner in which I was being treated, the level of his/her discourteousness and ill manners. I also asked that she request her team leader take the call personally.  Unbelievably, for a third time, her team leader refused to take my call, but deigned to bestow me with details of his name – Thomas Graham.  I explained to Betty that I appreciated her help in the matter, that I found Thomas Graham’s manner despicable, that I felt he was treating her in a poor manner by having her scurrying around relaying messages between him and I, that it gave an overall very poor impression, that I was under no illusion, but that I was being fobbed off, especially as I have fobbed many people off in various roles over the years and that I was very disappointed by the manner in which I was treated.  For the hell of it, I requested Betty one more time to request that Thomas Graham take my call as a matter of courtesy and once again he refused, A FOURTH TIME. I explained to Betty that I was not happy with the reason or lack of reasons given to me as to why broadband could not be supplied to my home.  I explained to her that, until I saw an individual outside my home, carrying out an inspection and attempting to rectify the problem, I did not see that anything was being done to resolve the issue. I explained to her that I wanted to speak with a technician or engineer who could give me a valid reason as to why broadband cannot be installed in my home.  She suggested that she transfer me to the technical department. I was transferred to the technical department and spoke with Adi who did his best to be helpful, but advised that his role was to assist people with broadband already installed in their homes.  He explained to me that he could not see any reason from the system why broadband could not be installed in my home.  He suggested that he transfer me to the sales department who might be able to assist me.  Given that I had spoken with the sales department several times and that this was where this entire sorry saga began, I explained to him that I had no desire to speak with them as they were sales people and I wanted to speak with someone with engineering/technical information.  I was put on hold for a time and Adi came back to me and said that he had spoken with a colleague who suggested that there may not be enough space on the exchange I was on and I that I should write to the Planning Department near Heuston Station to request that a slot be installed for my home.  He informed me that he could see from the system that at 18.59 he could see that a request for broadband connection was made. As you can no doubt see from the above, the situation is farcical.  I have contacted several other broadband providers, however, all of these use eircom lines and, as such, eircom “has me over a barrel”.  This is, in my opinion, an absolutely ridiculous situation.  It is July in the year 2015, not 1915.  I live in a relatively modern house in an area where broadband is readily available.  It is just not acceptable to say “sorry, we are unable to provide broadband at this time” without any investigation outside pressing a few buttons on a screen in an office in Dublin.  To add insult to injury, to treat a potential new customer so poorly is, aside from anything else, bad business.  My husband and I also have mobile telephone accounts which we had intended to transfer to eircom.  In addition, my two children will also shortly be getting mobile telephones and we were thus likely to bring four mobile phone accounts in addition to our broadband and, possibly, evision accounts.  The fact that eircom is a national provider whose lines your competitors use and that this is the best you can come up with is very disappointing.  In the circumstances above, I wish to receive a satisfactory explanation of events to date, an indication of how eircom intend to resolve this farcical situation and an explanation as to why Thomas Graham was allowed to treat a potential new customer and a member of staff on his team so poorly.  It created a very poor impression of your company and I genuinely felt sorry for Betty.  I should state at this time that I have no issue whatsoever with Betty’s handling of what was a very difficult phonecall.  She was very courteous to me at all times and, to be quite frank, put Thomas Graham to shame.  Perhaps he should offer her an apology for his behaviour too. You should also note that I am forwarding a copy of this to the ComReg and I intend to contact my local TD if this matter is not resolved in the short term.  I work from home two days a week and broadband is imperative to my livelihood.  I look forward to hearing from you by return.  Louise Simpson

    Thanks, I think I got the cabinet number from that link before, can get only:
    WBC ADSL 2+ Up to 6
    ADSL Max Up to 1.5
    I used to get 3.5 on ADSL 2+ but a fault on the line which would drop broadband when phone rang, they fixed it by putting me back on ADSL with 1.5
    Why can't they have a future estimated date? Virgin cable is just around the corner can't get that either. My 3G on iPhone is faster!

  • Why can't I login to Firefox Accounts to set up Sync? FF30+ keeps telling me to Please enable cookies; cookies ARE enabled, already tried Safe Mode.

    Exactly what it says on the tin.
    Why can't I log-in to Firefox Accounts to set up Sync from my laptop PC? FF30+ keeps telling me to Please enable cookies; cookies ARE enabled, and I already tried Safe Mode. This has been happening ever since the new Sync was implemented, so I'm guessing around FF 30. I am now up to FF version 34 and it still isn't working. I have not been able to sync since the "update."
    Problem #1: Going to about:accounts and clicking on the blue Get Started button opens a blank screen. There isn't even a prompt about cookies. It's just blank. Screen shot attached.
    This is before add-ons are disabled. If they're disabled in Safe Mode, we go to Problem #2.
    Problem #2: I skimmed a thread (https://github.com/mozilla/fxa-content-server/issues/1017) and tried logging in to Sync through accounts.mozilla.com instead, but though the screen doesn't turn blank while add-ons are still enabled, the "Enable cookies" warning is as far as I can get. Going to about:accounts in Safe Mode has the same result. I have cleared all my cookies and my cache, restarted FF multiple times with and without add-ons enabled, and still nothing. I have browsed this support forum for similar questions, and while other people are having the same issue, none of the other threads have been resolved yet. Several FF versions later, this is way too long for this issue to still be unresolved.... Screen shot attached.
    I know where Firefox's cookie manager is located, and I have toggled all the settings. I even allowed third-party cookies (though I really shouldn't since they're pointless). No difference. Screen shot attached.
    I looked in about:config and searched for the word "cookie" in the names, but even doing that is pointless for me since I'm not a programmer and hence ignorant in what all these settings actually mean. Screen shot attached.
    I'm at the end of my rope here, guys. It's been months. A year. Maybe more than a year; I don't even know anymore. I just got a new device and I don't want to add all my Firefox information to it one-by-one. There doesn't seem to be any way to contact Mozilla directly, so.... Someone help, please....

    ''guigs2 [[#answer-672422|said]]''
    <blockquote>
    NoScript stops cookies, please disable this addon/extension as well as make sure that the language en-us is installed.
    # 1) Open up the Firefox Preferences tab. You can do this by typing about:preferences in the URL bar.
    # 2) Click "Content"
    # 3) Next to "Languages", click "Choose"
    # 4) Select "English/United States [en-us]", click "Add"
    # 5) re-open "about:accounts"
    # 6) Click "Get Started"
    </blockquote>
    Thank you for replying. Unfortunately, I already did all of these things. As you can see from the below screenshot, the language is already set. Also, this screenshot was taken in Safe Mode, so NoScript is not enabled. About:accounts still says I need to enable cookies for some reason. So, this solution didn't work....

  • Why can't I cut and paste email addresses when sending documents?

    Why can't I cut and paste email addresses when sending files? I have to type them in each time...And it doesn't remember them for the future, as SendNow did.
    Also, it seems that the message I type in is not kept, as it was with SendNow?
    Thanks!

    Hi drlaura,
    You're correct on both counts--these features work differently Adobe Send than they do in Adobe SendNow.
    If you're sending files from Adobe Reader, you can access your local Address Book, which should make entering email addresses easier. Please see: I’m trying to send a file from Adobe Reader, but I can’t access my computer’s address book to find my contacts. Why not?
    Please let us know how it goes.
    Best,
    Sara

  • Why can't I drag and drop music from a folder on my PC into my iTunes window?

        Why can't I drag and drop music from a folder on my PC into my iTunes window?
    I have not found any article that has answered this question. They have come up with things like open the side bar and it will work, or you are using wrong format of music. Now this all happened when I upgraded to iTunes 10 and has not worked since and it worked fine before. Music format is correct, I have even gone as far as copying a file already in iTunes and trying to add it again. As soon as the files enters the frame of iTunes the music files icon the pointer is carrying turns into a circle with a slash through it.
    ITunes Ver. is 11.1.5.5  Windows Ver. is Windows 8.1 Pro with Media Center
    Files I have tried adding are standard MP3, 256 kbps purchased AAC Audio file, MP3 converted by iTunes into a 256 or 320 kbps AAC Audio file. None can be draged and droped but all can added by going to File/Add File to Library...  or File/Add Folder to Library...
    Add items from your computer to your iTunes library
    Do either of the following:
    1. Drag a file or folder from the desktop to the iTunes window.If you add a folder, all the files it contains are added to your library.
    2. In iTunes, choose File > Add to Library, locate a file or folder, and click Open.
         I can add files and folders by doing number 2 above but can not doing number 1
    I have gone as far as uninstalling iTunes and reinstalling per apple procedures below.
    Steps
    1. Remove iTunes and its related components from the Control Panel
    Use the Control Panel to uninstall iTunes and related software components in the following order and restart your computer:
    iTunes
    Apple Software Update
    Apple Mobile Device Support
    Bonjour
    Apple Application Support (iTunes 9 or later)
    Important: Uninstalling these components in a different order or only uninstalling some of these components may have unintended effects.

    I had this problem on Windows 8.1.1 and iTunes 11.2.2.3
    To resolve it from within Itunes I did :  Edit, Preferences, Sharing.
    I took the tick out of "Share my library on my local network"
    Click OK.
    Closed iTunes/
    Reopened iTunes and I can drag and drop.
    I went back into Edit, Preferences, Sharing and put the tick back and clicked OK.
    Works fine now.

Maybe you are looking for

  • CS3 Bridge is not function; do I need to re-install?

    Hello, I will admit to being woefully remiss in installing my wonderful CS3 software.  Just did so a few days ago.  Adobe Bridge was working fine, but today I can't access it at all for some reason.  Do I need to de-install and re-install everything

  • Solaris 10-Branded Zone

    Hi, I am trying to establish whether the following configuration is officially supported (and documented): "Non-Global zone running a release of Solaris 10 which is older than the release of Solaris 10 running in the Global Zone". I'm familiar with t

  • Scheduling ABAP Program to run Daily

    Hi, In my current scenario, i require my ABAP program(ZMYPROGAM) to run periodically (say every 1 hour/ 1 Day). Is it possible to schedule it so? kindly let me know how to go about. Regards, Siva Maranani.

  • Changed password not accepted in Mail????

    I have recently changed both my Gmail and Hotmail passwords following the announcement that some account details had been posted online. Now, when starting Mail, I got the pop up window saying my password was not accepted (hotmail) and I duly entered

  • Photoshop CC download failed...

    Hi Adobe Help Team, I have ordered your special offer for Photoshop CC & PS Lightroom 5 today and tried to download PS CC via Creative Cloud (PS Lightroom 5 is already in use on my computer). The Creative Cloud applet says that Photoshop CC has been