Dereferencing in Compostion

Hi All,
I have a question on dereferencing in composition.Suppose i have a an object A which composes
object B which in turn composes object C.So if i dereference object A to null.So, does composition
say to derefrence its child also?........otherwise the weak reference for the garbage collecter will be
there for those objects and might remain in the memory for long.

java_jamboree wrote:
Hi All,
I have a question on dereferencing in composition.Suppose i have a an object A which composes
object B which in turn composes object C.So if i dereference object A to null.So, does composition
say to derefrence its child also?........otherwise the weak reference for the garbage collecter will be
there for those objects and might remain in the memory for long.If there is another reference to object B somewhere, then it will remain in memory.
However, if the only reference to object B is object A, when object A is garbage collected then object B will be also.

Similar Messages

  • Dereferencing the NULL reference while saving a Survey

    While saving a survey first time, I am getting an error message "Dereferencing the NULL reference".
    More details as follows:
    Exception: Class CX_SY_REF_IS_INITIAL
    Program: CL_SVY_H_SVYDETAIL_IMPL=======CP
    Include: CL_SVY_H_SVYDETAIL_IMPL=======CM001
    ABAP Class: CL_SVY_H_SVYDETAIL_IMPL
    Method: DO_PREPARE_OUTPUT
    Line: 26 
    Long text: An attempt was made to execute a dynamic method callon an initial(NULL-) object reference. The reference must refer to an object.
    I opened the Survey creation page in crm ui, and filled in the ID, Application as Marketing and  selected CSS Style Sheet as CRM_SVY_OPP_WINLOSS.CSS
    I am very new to CRM module.
    Regards,
    Harsh

    Are you using internal CATT Server? If yes then you might need to turn on the CATT server again, see below:
    JTS based internal CATServer:
    Execute method SET_CATSERVER_JTS of class CL_SURVEY_CATSERVER. Leave parameter USER empty.
    ABAP based internal CATServer:
    Execute method SET_CATSERVER_ABAP of class CL_SURVEY_CATSERVER. Leave parameter USER empty.
    Cherrs,
    Ankur

  • A NULL interface pointer has been dereferenced

    This was an answer to someone who had this error message. I scoured the web to see what I could find. This is what I wrote to him. Does anyone else have any answers or know a work around???
    Hello,
    After doing some research on the error message, "A NULL interface pointer has been dereferenced". There may be a work around.
    Are you on a Mac? If you are, you may want to try updating CS4 and Installing the 9.0.2 update either manually or using the Adobe Update Manager. However you mentioned you exported to AVI which I know is a PC codec. Still maybe there is a adobe update for the PC as well.
    Also, if you are using video footage that uses interframe compression in any of the video placeholders (mpeg, h.264, mp4, etc), or if you have one or two mp3 or aic audio files, that may be an issue as well.
    If that's the case, convert audio files to aiff or wav, and convert the video into something that doesn't use interframe compression. Maybe Photo Jpeg, Animation, or apple pro res.
    Are you using just pictures? If so, then that info won't help either.
    If you are just changing the text and using pictures, I'm not sure why you are getting the NULL interface error.
    Answer the questions above and I'll try and help you out some more.
    Thanks,
    Cassidy Bisher
    President
    DropDrop
    http://www.dropdrop.com
    Hello once again,
    If you could review this small issue I had with one of the templates or forward this to the customer service department.
    I have been attempting to render the Grid Warp Final Main Comp for some time now. It took me about 10 minutes to swap the text and pictures out, but the rendering process has taken me over 20 hours and I still havent been able to pinpoint the issue. I have tried rendering in After Effects CS3 and After Effects CS4 both which give the same result. The rendering process will get to anywhere from 400-600 frames and it will give me a warning saying: "After Effects warning: A NULL interface pointer has been dereferenced." Right after clicking OK on this warning another window comes up saying After Effects error: Quicktime export failed (14). This happens whether I export as FLV or if I use the render queue to do avi. Please advise on a possible solution when you have a chance as this heavily delayed our project time line. I have made sure there is no missing files in the project.
    David

    I got the same exact error in Windows 7. Seems to be a video inside the composition or a part of the composition itself thats the problem. I've tried increasing both the swap space and the ram usage. Still nothing but the video does push a solid 3 gigs of ram usage. I'm using cs3 myself.

  • Int dereferencing error when transforming 2d array

    Int WorkArray = new Int[9];
    WorkArray.set( new int[] { 6, 3, 0, 7, 4, 1, 8, 5, 2 } );
              for( Tloop = 0; Tloop <= 8; Tloop++ )
                   TransForms[0][Tloop].set( WorkArray.getValueAt( Tloop ) );
              }I get the "Int Cannot be Dereferenced" error on the line beginning with TransForms.
    The definition of the array TransForms is private int[][] TransForms = new int[9][9];

    That was a mistake yes, ive refined the code more but it still gives me this damn "Int cannot be dereferenced" error.
             int[] WorkArray = new int[9];
         int[] rotate90 = {6,3,0,7,4,1,8,5,2};
              WorkArray = rotate90;
              for( Tloop = 0; Tloop <= 8; Tloop++ )
                   TransForms[0][Tloop].setInt( WorkArray [Tloop] );
              }basically the 0-8 array represents a 3*3 grid and this code is to create a transformation that represents that grid rotated right by 90 degrees. I have 8 more of these bits of code to do other transformations. Obviously none of them work as yet. But if I get this one fixed then i can apply this fix to the others.

  • Dereferenc​ing a pointer from a Windows API call within labview

    I was looking into using the CreateFile windows API funciton within a labview project I'm working on.  I found some C code to do essentially what I want to do with this fuction (c code and details are within the attached VI).  Unfortanatly its return type is a pointer to a pointer and I got a bit
    lost when I looked into how to dereference this pointer to a value.   By
    the way WinBase.h defines INVALID_HANDLE_VALUE as:
    #define INVALID_HANDLE_VALUE ((HANDLE)(LONG_PTR)-1)
    Essentially I need to detect when CreateFile returns INVALID_HANDLE_VALUE to feed into a larger labview program I'm working on.
    So is it possilble to dereference this pointer or should I be looking for another way of getting the same result?
    Attached is the basic mechanism I worked up - the dereferencing block is disabled because it doesn't work.  I looked into the memblock() (CIN function) to do the dereferencing but couldn't find all the pieces to that puzzel yet.
    Thanks for your help,
    Christopher
    Attachments:
    File IO - is file open3-GetValueByPointer.vi ‏18 KB

    Just use "open/create/replace" file in LabVIEW. It should return an error if the file is already open. Just check for that error. If it isn't already open, yes it will open it, but just close it right after.
    CLA, LabVIEW Versions 2010-2013

  • Float cannot be dereferenced

    Hi,
    I get the following compilation error message:
    "float cannot be dereferenced"
    and i don't know what it meens.
    My code was compiling until i add the intValue methode in the last line.
    Here is the part of code :
    Dimension d,i;
    d = getSize(); // i get the size of the frame
    i = _imPanel.getSize();       // i get the size of an element in this frame
    float hp = i.height/d.height; // i calculate a ratio between those 2 size
    float wp = i.width/d.width; // for each dimansion
    _imPanel.setPreferredSize(new Dimension((getWidth()*wp).intValue(),(getHeight()*hp).intValue())); 
    // and i apply a new dimension to the element int the frame using the ration and the new size of the frame.
    As the ratio is a float and Dimension needs int in parameters, i decided to use the intValue methode to cast the float into int.
    That's it.

    Hello,
    Your problem is that you are trying to use a primitive type as if it were an object!
    You cannot call methods on the primitive types (int, float, double, etc.). Therefore, your line should be converted from:
    Dimension((getWidth()*wp).intValue(),(getHeight()*hp).ntValue()));to Dimension(new Float(getWidth()*wp).intValue(), new Float(getHeight()*hp).intValue()));Which could be done better by directly casting the values:
    Dimension((int)(getWidth()*wp), (int)(getHeight()*hp));Manuel Amago.

  • Error : char cannot be dereferenced

    I wrote this program for my test in high school. I am getting 1 error and cannot fix it. can any1 please tell me how to fix this error. The following is the program and the rror message "-
    I AM NEW HERE so i would really BENEFIT from ANY HELP !
    class testing
              static int[] search(char list[], char target) {
                   int brand[] = new int [list.length];
                   for (int i=0; i<list.length; i++) {
                        if (list[i] == target)
                        brand[i] = target.positionOf();
                   return brand;
              } // end method
              public static void main (String str[]) {
                   char list[] = {'M', 'B', 'A', 'J', 'P', 'J','M', 'J'};
                   char target = (str[0].charAt(0));
                   System.out.print ("The list = ");
                   for (int i =0; i<list.length; i++)
                        System.out.print(list[i] + ", ");
                   System.out.println();
    System.out.println ("Target letter " + target + " has been found in position " + search(list,target) + ".");
              } // end main
         } // end class     
    Error :
    C:\JPadPro\MyProjects\testing.java:14: char cannot be dereferenced
         brand[i] = target.positionOf();
    ^
    1 error
    Finished

    My program question was --> Write a program to find a symbol from a list of symbols. Your search method should return all positions in which the target symbol is found.
    According to your solution I changed to indexOf() but still i get the same error.
    class testing
              static int[] search(char list[], char target) {
                   int brand[] = new int [list.length];
                   for (int i=0; i<list.length; i++) {
                        if (list[i] == target)
                        brand[ i ] = (list[ i ].indexOf(target));
                   return brand;
              } // end method
              public static void main (String str[]) {
                   char list[] = {'M', 'B', 'A', 'J', 'P', 'J','M', 'J'};
                   char target = str[0].charAt(0);
                   System.out.print ("The list = ");
                   for (int i =0; i<list.length; i++)
                        System.out.print(list[i] + ", ");
                   System.out.println();
                   System.out.println ("Target letter " + target + " has been found in position " + search(list,target) + ".");
              } // end main
         } // end class     
    Error =
    The current directory is: C:\JPadPro\MyProjects
    C:\JPadPro\MyProjects\testing.java:14: char cannot be dereferenced
              brand[i] = (list.indexOf(target));
    ^
    1 error
    Finished

  • Character cannot be dereferenced?

    //output from compiler
    partA.java:72: char cannot be dereferenced
                    String theCharacterToBeAString = checkValue.toString();
                                                               ^the code
    public boolean isOperator(char checkValue)
              String theCharacterToBeAString = checkValue.toString();
              if(theCharacterToBeAString.equals("+"))
                   return true;
              else
                   return false;
         any ideas?

    Woops!
    public static boolean isOperator(char checkValue) {
        return checkValue ==  '+';

  • I don't know what to order. I want PS for photo editing and some composting. I don't do any website work or sharing yet. I have been using elements for a few years and also have Lightroom 5 on my desktop. I don't want to spend $1000s for a bunch of stuff

    I don't know what to order. I want PS for photo editing and some composting. I don't do any website work or sharing yet. I have been using elements for a few years and also have Lightroom 5 on my desktop. I don't want to spend $1000s for a bunch of stuff I don't use. Any advice on what to buy?

    Well, there is a whole world of free or affordable software out there like GIMP, PDPaint and similar. Otherwise if you want to stick with Adobe stuff signing up for the CC photography program would be the most cost-efficient way...
    Mylenium

  • Dereferencing in a method

    Hello,
    If I create these simple object types :
    create type Article_t as object
    ( artno integer
    , title varchar2(100)
    , price           Money_t
    create type OrderItem_t as object
    ( article     REF Article_t
    , qty          integer
    , member function subtotal (cur in varchar2) return Money_t
    The method 'subtotal' could look like :
    create type body OrderItem_t as
    member function subtotal (cur in varchar2) return Money_t is
    m Money_t
    begin
    m := article.price ;
    ... --- compute the article price
    return m ;
    end subtotal ;
    end;
    But the instruction 'm := article.price' is subject to a compilation error ! Does it mean that I cannot use the dereferencing operator in a procedural statement ???
    Must I use a select statement ???
    Thanks,
    Rigis

    Regis,
    You cannot navigate through refs within PL/SQL procedural statements. Instead, you must use the function DEREF in a SQL statement. For more information, check out the documentation at http://download-west.oracle.com/otndoc/oracle9i/901_doc/appdev.901/a89856/10_objs.htm#8348.
    Regards,
    Geoff
    Hello,
    If I create these simple object types :
    create type Article_t as object
    ( artno integer
    , title varchar2(100)
    , price           Money_t
    create type OrderItem_t as object
    ( article     REF Article_t
    , qty          integer
    , member function subtotal (cur in varchar2) return Money_t
    The method 'subtotal' could look like :
    create type body OrderItem_t as
    member function subtotal (cur in varchar2) return Money_t is
    m Money_t
    begin
    m := article.price ;
    ... --- compute the article price
    return m ;
    end subtotal ;
    end;
    But the instruction 'm := article.price' is subject to a compilation error ! Does it mean that I cannot use the dereferencing operator in a procedural statement ???
    Must I use a select statement ???
    Thanks,
    Rigis

  • ERROR: int cannot be dereferenced

    hi everyone i am trying to copmile the following code
    public void refreshGUI() {
            MessageBoardQueries MBQ = new MessageBoardQueries();
            Date date = Calendar.getInstance().getTime();
            DateFormat df = new SimpleDateFormat("dd/MM/yyyy");
            String argDate = df.format(date).toString();
            int pNumber = MBQ.queryPending(argDate);
            int aNumber = MBQ.queryAccepted(argDate);
            int dNumber = MBQ.queryDeclined(argDate);
            pendingNumberField.setText(pNumber.toString());
            acceptedNumberField.setText(MBQ.queryAccepted(argDate));
            declinedNumberField.setText(MBQ.queryDeclined(argDate));
        }but i keep getting the error:
    int cannot be dereferenced on the line
    pendingNumberField.setText(pNumber.toString());
    does anyone know why?

    because int is a primitive datatype, hence doesn't inherit from java.lang.Object, and as such doesn't have a toString method
    try Integer.toString(pNumber) or String.valueOf(pNumber). either is equally valid

  • Boolean cannot be dereferenced

    Hi all any help would be great:
    Im getting these errors:
    KhanAccount.java:41: boolean cannot be dereferenced
    for(int i = 0; i < passwd.length(); i++)
    ^
    KhanAccount.java:42: boolean cannot be dereferenced
    if (Character.isDigit(passwd.charAt(i)))
    ^
    KhanAccount.java:45: boolean cannot be dereferenced
    if (passwd.length() >= 6 && hasDigit)
    ^
    3 errors
    This is the code:
    (main method)
    import java.text.*;
    import javax.swing.*;
    public class KhanPassword
    public static void main (String [] args)
    KhanAccount oneacct = new KhanAccount ();
    inputacct (oneacct);
    System.exit(0);
    public static KhanAccount inputacct (KhanAccount aacct)
    /* If an invalid password is entered (or the two entries do not match),
    the user should be prompted to try again. */
    /* Continuously reads a pair of passwords until the two match.*/
    do { // Continuously reads the password until it is a valid one.
    do {
    String password = JOptionPane.showInputDialog("Enter password:\n"
    + "(must be at least six characters long and have at least one digit)");
    aacct.setusername(un);
    /* display a message indicating whether it is valid or not */
    if (!aacct.setPassword(passwd))
    JOptionPane.showMessageDialog(null, "Invalid password!");
    else {
    JOptionPane.showMessageDialog(null, "Valid password!");
    break;
    while (true);
    /* The password should be prompted for twice */
    String reenter = JOptionPane.showInputDialog("Re-enter password:");
    /* the entries should match or a message provided to the user. */
    if (!passwd.equals(reenter))
    JOptionPane.showMessageDialog(null, "Two passwords don't match!");
    else
    JOptionPane.showMessageDialog(null, "Two passwords match!");
    } while (!passwd.equals(reenter));
    return aacct;
    (called method)
    public class KhanAccount
    public String username;
    public boolean password;
    public String reenter;
    public boolean passwd;
    public static void KhanAccount (){};
         public String getusername()
         return username;
         public boolean getpassword()
         return password;
         public void setusername (String un)
         username = un;
    public boolean setPassword()
    password = passwd;
    /* check if contains digit*/
    boolean hasDigit = false;
    for(int i = 0; i < passwd.length(); i++)
    if (Character.isDigit(passwd.charAt(i)))
    hasDigit = true;
    if (passwd.length() >= 6 && hasDigit)
    password = passwd;
    return true;
    } else
    return false;
    }

    Btw, isn't better to initiate hasDigit to true and then when
    a character is wrong set hasDigit = false and quit loop
    with break or so?
    And methods called set.. often returns nothing if they return
    boolean they are often named with is... or so isPasswd
    I've learned basic methods should be divided into three types:
    constructors starts with make..
    modifiers , set..
    predicats , is..
    //jF
    /* check if contains digit*/
    boolean hasDigit = false;
    for(int i = 0; i < passwd.length(); i++)
    if (Character.isDigit(passwd.charAt(i)))
    hasDigit = true;
    if (passwd.length() >= 6 && hasDigit)
    password = passwd;
    return true;
    } else
    return false;
    }

  • Workflow issue- Dereferencing of the NULL reference

    Hello All,
    I have an issue with sending mails to external e-mail ids through a workflow process. I am using the FM SO_DOCUMENT_SEND_API1 for sending mails. However, because of the latest Basis version I need to call this FM in a seperate task when the process is in BACKGROUND mode.
    The current scenario is, my workflow will trigger a method, which internally call this FM in a seperate TASK. When I run the workflow/process I get an error in the method, which triggers this FM. The erro says "Dereferencing of the NULL reference"
    Is this because of calling the FM in a seperate task, as the workflow already has a pre-defined TASK? if yes, how do we go about this?
    Thanks,
    Anil

    Hello Anil,
    I am facing a similar message when i am running the SAP standard workflow 18900044 for leave encashment. I am calling a class CL_HRPBSIN_HANDLE_LEREQ_WF and the method CALL_WORKFLOW.
    Can you please tell me how you managed to solve your issue.
    Regards,
    Ritwik

  • Error: Dereferencing of the NULL reference

    Dear Friends,
    one of our user is running a report on web bex  and he is getting following error.
    com.sap.ip.bi.base.application.exceptions.AbortMessageRuntimeException:
    Termination message sent ABEND RS_EXCEPTION (000): Dereferencing of the NULL reference 
    MSGV1: Dereferencing of the NULL reference
    But when we run this with our user we are not getting any error.
    if we run this report using RSRT usin user's user id it is not giving any error.
    only genrating error when we try to run using Web Bex .
    Any help hightly Appicated.
    Malik

    Thanks friends,
    i already check the given sap note but that note is for support pack till17 and we have already 19 support level.
    thats why this is not the solution.
    second i check it publishing. its working fine with all the users except 3 of our users. i dont know why the error is
    comming with them only.
    and i also check the url  no specific variable values.
    any other idea.
    regards
    Naeem

  • What does the term dereferenced mean?

    hello, i'm gettin a compile error stating that a char cannot be dereferenced.
    I'm not exactly sure what the error is saying here's the line of code:
    <code>
    if (sentence.charAt(0).equals(word.charAt(0)))
         startedMatch = true;
    </code>
    I'm greatful for any help I get
    thanks!

    so how would I fix it?
    I want to compare two strings, well actually find out if the smaller string is within the larger one using recursion...I was just testing out different ways, and obviously that one doesn't work...

Maybe you are looking for

  • Can't find (hidden?) file to remove

    I am using microsoft remote desktop 8.0.5 with OS X 10.9.2 to connect to my company's demo server.  The connection fails when I try to access the server and generates a message that includes this snippet: Exception caught: Exception in file '../../li

  • 2 rdf , 2rtf could create 1 pdf file ?

    I was wondering if it is possible to create ONE PDF file from more than 2 rdf. here , my thought is... there are 2 rdf that creates each PDF files. it would be very useful if there is a techniq that merge those PDF created files into One PDF.

  • Help ! Anxious !---The session is not valid; it may have expired.

    Caused by: com.sap.mdm.internal.protocol.manual.ServerException: The session is not valid; it may have expired. Create a new session and try the operation again.      at com.sap.mdm.internal.protocol.manual.AbstractProtocolCommand.execute(AbstractPro

  • Trying to install new adobe, or flash player

    why has nothing happened when I've tried to download the latest adobe, or flash player?  I've probably tried 15-20 + times since 1/29/14

  • How do I get my iPad to print on hp3050

    I need to get my iPad to print on my hp3050. Help