Uploaded image for project: 'Axis-C++'
  1. Axis-C++
  2. AXISCPP-1028

More efficient use of memory resources

    XMLWordPrintableJSON

Details

    Description

      When deserializing simple types, and the type is a pointer type, the code generator generates code as follows:

      param->setrequiredAttribute (pValue0);
      Axis::AxisDelete( (void *) pValue0, XSD_STRING);

      That is, we use the setter method which makes a copy of the string, and then delete the string. It would be more efficient to store the deserialized value in the class without making a copy and performing a delete.

      To achieve this goal, need to enhance setter methods so that not only is a flag indicating whether a deep copy is to be performed is generated, but another flag indicating whether a copy is to be performed. By default, the makeCopy flag will be true and thus will provide the same semantics as the code is today. However, the code generator can then make use of this flag so that it can call the setter method with deep copy set to true and makeCopy flag set to false - implying that the value being passed in should be stored in the class as-is, but because deep flag is set to true, it will be owned by the object.

      Attachments

        Activity

          People

            nadiramra Nadir K. Amra
            nadiramra Nadir K. Amra
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: