Does making objects equal null help the gc handle memory leakage problems

hi all,
does making objects equal null help the gc handle memory leakage problems ?
does that help out the gc to collect unwanted objects ??
and how can I free memory avoid memory leakage problems on devices ??
best regards,
Message was edited by:
happy_life

Comments inlined:
does making objects equal null help the gc handle
memory leakage problems ?To an extent yes. During the mark phase it will be easier for the GC to identify the nullified objects on the heap while doing reference analysis.
does that help out the gc to collect unwanted objects
??Same answer as earlier, Eventhough you nullify the object you cannot eliminate the reference analysis phase of GC which definitelely would take some time.
and how can I free memory avoid memory leakage
problems on devices ??There is nothing like soft/weak reference stuffs that you get in J2SE as far as J2ME is concerned with. Also, user is not allowed to control GC behavior. Even if you use System.gc() call you are never sure when it would trigger the GC thread. Kindly as far as possible do not create new object instances or try to reuse the instantiated objects.
~Mohan

Similar Messages

  • Does making final field static improve performance or save memory?

    Are final fields given value at compile time by the compiler?
    private final String FINAL_FIELD = "31";
    Does making final field static improve performance or save memory?

    Actually it's final static fields with primitive or String type that are treated specially. For other final fields only extra compile time checking is produced, they are the same at run time.
    final static primitives are treated as compiler constants, and a literal value is substituted. No actual field is created.
    Myself I consider an awareness of Java internals valuable. For example, if you were unaware of the above the occasional misbehaviour of final static primitives referenced in other classes would be baffling. If your code references a final static primitive from another class it's compiled as a literal, not a reference, so if their value changes in the other class, the referring class will retain the old value if not re-compiled.

  • Help! nokia 6300 memory card problem

    i bought sd 2gb memory card and it won't let me download more than 500 mb onto it! the memory status shows that there is plenty left but if i try to download any more - or even move an image from phone to memory card - it tells me that operation failed! i did format the card and it didn't help
    help!

    try to reinstall your current firmware (after backing up all your important data first) or see if there is an update for your 6300 via nokia software updater. but i think there is a problem with your memory card rather than your phone, as can happen with normal USB flash drives when copying files to them, they suddenly give up and start giving strange errors. so maybe try replacing your card with a better quality new one.
    hope this helps

  • Difference between .equals("") and .equals(null)

    Can any one please tell me the difference between the following?
    String someString;
    someString = someMethod(someParameter);
    After the method call, if I am going for a check like this..
    what will each check do?
    1. if (someThing.equals(null))
    2. if (someThing.equals(""))
    3. if (something == null )
    4. if (something == "" )
    Thanks in advance,
    Regards
    Rakesh

    First, understand that the empty string ("") and null are two very different things. The empty string ("") is a string object that just doesn't contain any characters. It's still an object though--you can call it's methods.
    Null, on the other hand, is essentailly nothing. It's a special value that means "Nothing. No object here." (Ignoring for now the distinction among the null type, a null reference, etc.) You can't call methods or refer to fields on null. If you try, you'll get a NullPointerException.
    1. if (someThing.equals(null))Calls the equals method on someThing to compare someThing to null. If someThing is not null, this returns false. If someThing is null it... what? returns true? Nope. Throws NullPointerException. You can't call the equals method on a null someThing.
    Therefore there's no point in ever using equals(null).
    2. if (someThing.equals(""))Calls the equals method on someThing to compare someThing to the empty string (""). If someThing is not null, but is empty, it returns true. If someThing is non-null and is not empty (e.g., "abc"), it returns false. If someThing is null, it throws NPE.
    One generally uses the equals method, not the == operator to compare objects--that is, to see if their contents or states are equal. The == operator is used to see if two referecnes refer to the same object, or if a reference is null.
    3. if (something == null ) Evaluates to true if something is null and to false if something is non-null. Never throws NPE (since we're not calling a method or accessing a field).
    4. if (something == "" ) You never really want to use == to compare a String variable to a String literal like this. This checks to see if the reference something is referring to the same object as the "" is. The "" will be referring to an object in the constant pool. Even if something is the empty string, it may not refer to the same entry in the constant pool.
    That is (something == "") could evaluate to false, but something.equals("") could return true.

  • Object reference NULL exception is occuring at the time of iterating the projectCustomFieldRows

    Hi ,
    I'm gettign object reference NULL exception in the following for each statement.  Please help me to resolve this issue.
    foreach (SvcProject.ProjectDataSet.ProjectCustomFieldsRow row in prjDataSetValues.ProjectCustomFields.Rows)
                        //check if the GUID is the same
                        //a93fa9de-98a8-4477-8b9b-760f7f7b7bb5
                        eventLog.WriteEntry("Inside the for each  the value of row.MD_PROP_UID is :" + row.MD_PROP_UID);
                        if ((row.MD_PROP_UID == myCustomFieldId) && (row.PROJ_UID == myProjectId))
                            //if yes, write it into the container
                            row.NUM_VALUE = 12345;
                            eventLog.WriteEntry("Inside the equal condition");
                            //and set the indicater
                            updatedata = true;
                            break;

    getting the exception at the time of creating the user using opensso api

  • [svn:bz-trunk] 11030: Tweak the deserialization of ASObjects to treat an empty string for the type of an object as null .

    Revision: 11030
    Author:   [email protected]
    Date:     2009-10-20 11:35:02 -0700 (Tue, 20 Oct 2009)
    Log Message:
    Tweak the deserialization of ASObjects to treat an empty string for the type of an object as null. It appears that there is some logic in the LC remoting code that relies on a non-null class name to always exist. This change reverts to the old behavior of not allowing empty string as a value for the ASObject.namedType.
    This should fix bug 2448442 and its duplicates caused by the recent serialization changes.
    I don't think this is the perfect fix. Pending further investigation, a better fix would be either:
    a. If it's OK to assume that empty string should always mean null for the type of the ASObject, the code that enforces it should be in the setter/getter inside ASObject and not in the deserializer.
    b. ASObject doesn't guarantee that a named type exists or is valid. In that sense an empty string is as bad as some random characters that cannot be a valid class name in java, so depending on how disruptive it may be, the fix should be in any logic that uses ASObject.getType().
    Modified Paths:
        blazeds/trunk/modules/core/src/flex/messaging/io/amf/AbstractAmfInput.java

    Hi Pavan,
    "In your payload there is no namespace prefix for the elements under PayloadHeader element."
    Yes, you are right - but this message is standard AQ Adapter Header message - it's not defined by me. I just used message which was automatically added to my project when I have defined AQ Adapter.
    "In your process is the default namespace is same as namespace value of tns ??"
    Do you mean targetNamespace? If yes it's different as it points to process "targetNamespace="http://xmlns.oracle.com/PF_SOA_jws/PF_APPS/APPS_PROCESS" (names of application and process have changed as I try different ways to do that)
    ns1 is: xmlns:ns1="http://xmlns.oracle.com/pcbpel/adapter/aq/PF_SOA/PF_APPS/PO_AQ"
    "another thing is tns and ns1 should have same values.."
    When I create a variable of header type, namespace ns1 is automatically created for it. I set it as property of receive activity. When process is instantiated on the serwer I get the error in which you can see that namespace is tns.
    Maybe I'm doing something wrong but I don't see how I could fix this in my process.
    You can see that the message I get on the server has nothing in common with the application/project/process names. Is it possible to define such variable?
    Regards
    Pawel
    PS:
    In Transformation xsl file, both variables (source and target) has tns namespace for Header and PayloadHeader, and no namespace for subfields.
    Edited by: pawel.fidelus on 2010-01-05 02:37

  • How does APEX check for null values in Text Fields on the forms?

    Hello all,
    How does APEX check for null values in Text Fields on the forms? This might sound trivial but I have a problem with a PL/SQL Validation that I have written.
    I have one select list (P108_CLUSTER_ID) and one Text field (P108_PRIVATE_IP). I made P108_CLUSTER_ID to return null value when nothing is selected and assumed P108_PRIVATE_IP to return null value too when nothign is entered in the text field.
    All that I need is to validate if P108_PRIVATE_IP is entered when a P108_CLUSTER_ID is selected. i.e it is mandatory to enter Private IP when a cluster is seelcted and following is my Pl/SQL code
    Declare
    v_valid boolean;
    Begin
    IF :P108_CLUSTER_ID is NULL and :P108_PRIVATE_IP is NULL THEN
    v_valid := TRUE;
    ELSIF :P108_CLUSTER_ID is NOT NULL and :P108_PRIVATE_IP is NOT NULL THEN
    v_valid := TRUE;
    ELSIF :P108_CLUSTER_ID is NOT NULL and :P108_PRIVATE_IP is NULL THEN
    v_valid := FALSE;
    ELSIF :P108_CLUSTER_ID is NULL and :P108_PRIVATE_IP is NOT NULL THEN
    v_valid := FALSE;
    END IF;
    return v_valid;
    END;
    My problem is it is returning FALSE for all the cases.It works fine in SQL Command though..When I tried to Debug and use Firebug, I found that Text fields are not stored a null by default but as empty strings "" . Now I tried modifying my PL/SQL to check Private_IP against an empty string. But doesn't help. Can someone please tell me how I need to proceed.
    Thanks

    See SQL report for LIKE SEARCH I have just explained how Select list return value works..
    Cheers,
    Hari

  • I backed up my movies and rebuild my computer, and after making sure i'm using the latest version of itunes and quicktime and and making sure i still had spare computer authorizations, i still get error 23132.  Please help.

    I backed up my movies and rebuild my computer, and after making sure i'm using the latest version of itunes and quicktime and and making sure i still had spare computer authorizations, i still get error 23132.  Please help.

    I had this exact issue.  Spent over an hour on the phone with apple support, they couldn't resolve.  Here is what I ended up doing, that worked.
    1.  Turned iTunes match off on all my iOS devices
    2.  Deleted the offending playlists from the iOS device they originated on
    3.  Started iTunes, let it run (literally) for an hour before it became responsive.  First thing I did, before clicking anywere else was disable iTunes match.  If I clicked anywhere, it would clock for another hour.
    4.  Let iTunes run overnight, by morning it had cleaned out the repeating play lists.  This got my Mac/iTunes back to an operable state.
    5.  Restore iPhones from backup in iTunes.
    What was causing my issue was a single playlist that was created on an iPhone, then suddenly showed up with several thousand duplicates on my other iPhone.  The culprit playlist did not, for some reason, duplicate itself on my two iPads.  Apple support seemed to think it was because the problem iPhone tried to sync the playlist to iCloud over and over again unsuccessfully, then it finally went through and populated the thousands of blank/failed playlists which then tried to propigate to iTunes and my other iOS devices.  Seems like a reasonable theory.
    I have not yet re-enabled iTunes match.  So, no idea what will happen if I decide to go back down that rabbit hole.

  • Does the object in BO repository the same in different BO version?

    Hi Guys,
    Does the object in BO repository the same in different BO version or in different type of Database?
    One of my customer said that the objects(index, procedure, table ,view, etc..) are different between their TEST and PRO environments.
    Your help is appriciated.
    Thanks.
    Regards,
    Daniel

    Hello Daniel,
      The BO repository or CMS database has a different database structure between versions of the CMS database.  So if you have BO XIR2 versus XIR3, then they  have different database structures.  If the customers has a one version of XIR2 in TEST and it is a  different version like XIR3.1 in PRO environment then that would make sense. Each version of the XIR1, XIR2, XIR3 has a different database structures for the CMS database.   I hope this answers your question.
    Regards,
    Jorge

  • Any ideas how I can insert a pdf into word, using the insert object option. However the pdf i want to insert has text and lines annotated, but once inserted the comments don't appear????  any help would be greatly appreciated.

    Any ideas how I can insert a pdf into word, using the insert object option. However the pdf i want to insert has text and lines annotated, but once inserted the comments don't appear????  any help would be greatly appreciated.

    You will need to find a forum for MS Word since that is the software that you are trying to manipulate in this.  If you think the processing/creation of the PDF plays a role then you should ask in the forum for the software that you are using to create the PDF.
    This forum is for issue regarding downloading and installing Adobe trial products, so in any circumstance, your issue does not fit in this forum.

  • Does QueueSender send same object multiple times to the Queue

    Hi ,
    Does the QueueSender sends the same message object multiple times to the queue ?If so then the same will be send multiple times right. why do the client retain same object for long time if the expiry time is 0, Please some one help on this .
    Thanks
    Maruti

    Little_Pale_Face wrote:
    Michel,
    Just to clarify, I can drag duplicates to an album but it only appears once - so it's not actually adding to the album. The question, as I understand it, is that PSE doesn't warn you whereas it use to in PSE 3..
    Ok, that clear now.
    If I remember correctly, the format of the database for PSE was changed around version 4. So the error message that Beachcomber was seeing may have been generated by the old database system.
    Version 4 used Microsoft Access as the database engine, not sure about version 5. Anyway I am sure that from version 6, the sqlite database engine was used.

  • Win32_NTLogEvent sometimes returns null for the Message field even though the event does contain a message

    This does not happen often but it does happen. We have an application that regular runs WMI queries to collect windows events. However, on a particular machine, on particular events, the windows event description that comes from the Win32_NTLogEvent.Message
    field is null. The event does indeed have a description and that can clearly be seen in the Event Viewer.
    One particular event that causes the problem is
    Event Type: Information
    Event Source: MsiInstaller
    Event Category: None
    Event ID: 1035
    Date:  4/21/2010
    Time:  8:51:53 AM
    User:  NT AUTHORITY\SYSTEM
    Computer: COMP201002
    Description:
    Windows Installer reconfigured the product. Product Name: 32 Bit HP BiDi Channel Components Installer. Product Version: 1.1.0.2. Product Language: 1033. Reconfiguration success or error status: 0.
    As you can see, the description exists. However, the field returned by WMI is null.
    Any way i can diagnose the problem to see what's going on? Is this a WMI bug?

    Hi markoueis, I suggest you first check these links for troubleshooting WMI as the issue can be caused by WMI on the particular machine:
    http://www.microsoft.com/technet/scriptcenter/topics/help/wmi.mspx
    How to troubleshoot WMI-related issues in Windows XP SP2
    http://support.microsoft.com/kb/875605
    You can also try restart WMI service and see the result. If this does not work, you can try the steps in the following article to rebuild repository:
    WMI Troubleshooting: The Repository on Vista / Server 2008
    http://blogs.technet.com/b/askperf/archive/2008/07/11/wmi-troubleshooting-the-repository-on-vista-server-2008.aspx
    Hope this helps!
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

  • Itunes does not allow me to change the store due to rent objects not yet expired. here are non left

    Itunes does not allow me to change the store due to rent objects not yet expired. there are non left.
    Chris

    Hi Evii0105,
    The article linked below details a number of troubleshooting steps that can help restore your computer's ability to connect to the iTunes Store.
    Can't connect to the iTunes Store
    http://support.apple.com/en-us/HT201400
    Cheers,
    Allen

  • I cannot send an email from my iPad 2? No problem receiving, why does this happen? Have tried the suggestions for setting up email and after doing the sync mail through iTunes receiving worked great but still cannot send? Any help would be great

    I cannot send an email from my iPad 2? No problem receiving, why does this happen? Have tried the suggestions for setting up email and after doing the sync mail through iTunes receiving worked great but still cannot send? Any help would be great!

    The fact that you can receive means you have a valid e mail address, and have established the connection to the incoming server, so all of that works.  Since the send does not work, that means your outgoing server is rejecting whatever settings you used formthe outgoing set up.  Try them again. 
    Google your particular isp, and ipad and many times you will find the exact settings needed for your isp.  Or tell us here, and soneone else may be on the same isp.  Some mail services need you to change a port, or have a unique name for the outgoing server.  
    Kep trying.

  • Unable to get value of the property 'nodeName': object is null or undefined  Error in apex_ns_3_1.js

    I am getting the following error with IE9 and Firefox 26 with application express 3.2:
    SCRIPT5007: Unable to get value of the property 'nodeName': object is null or undefined
    apex_ns_3_1.js, line 589 character 10
    this.dialog.check2 = function (e){
    var tPar = html_GetTarget(e);
    var lEl = $x('apexir_col_values_drop');
    var l_Test = true;
    ******  while(tPar.nodeName != 'BODY'){
    tPar = tPar.parentNode;
    if(tPar == lEl){l_Test = false;}
    if(l_Test){$x_Remove('apexir_col_values_drop')}
    This happens when I click the Gear Icon, then Filter, then I click the dropdown arrow under expressions and pick an expression from the list.
    If I set (through IE Developer tools) back to IE8 mode, I don't get the error.

    Guess no one is using 3.2 any longer or no one else gets this error.....  Guess I can edit the JavaScript file to trap the error since it really doesn't seem to cause an issue.  Just didn't want to have to go that route.

Maybe you are looking for

  • Upgrading cf7mx to cf8 in a new intranet server

    Dear all, does someone explane me the better way to moving from cfmx7 to cf8 in a new hardware? My system is working in a intranet, and due some complicate network rules and custom java class, I'd like to do a deep test of the cf8 applications before

  • HP C7200 All-in-One printer will not print through the Wifi network

    I have used the HP printing and scanning Doctor but none of the proposed solutions have solved the problem. The blue light for wirelwss 802.11g service is on and connected to the same Wifi address as my laptop is using now. My Dell laptop is running

  • Question Marks in Adobe Context Editing

    Hello, How come when editing a page in adobe context editing which has characters such as , " : that they show up as question marks and how do I fix this? Thanks, Greg

  • Opening a download in a new window

    We have a list of files that are relevant to the user. We display this list of files to the user in a table so they can view the ones they want. I have written a servlet that reads the file information from a cookie, and delivers the file to the clie

  • Discerning Clips In Event Library that are Used in a Project

    I am cutting my FCPX teeth on 10.1 after having used imovie for years.  I am accustomed to imovie showing me which portions of a clip are being used in the timeline by having a small colored bar visible on that portion of a video clip in the Event Li