axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "nadir amra (JIRA)" <axis-c-...@ws.apache.org>
Subject [jira] Updated: (AXISCPP-1054) Have SoapHeader destroy header blocks
Date Sun, 14 Nov 2010 21:29:13 GMT

     [ https://issues.apache.org/jira/browse/AXISCPP-1054?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

nadir amra updated AXISCPP-1054:
--------------------------------

    Description: 
SoapHeader::~SoapHeader() contains a memory leak? The m_headerBlocks member variable is never
cleared.

The following code needs to be added to the beginning of the destructor before 'm_headerBlocks.clear();':
    // deletion of Header Block RHA added
    list<IHeaderBlock*>::iterator itCurrHeaderBlock= m_headerBlocks.begin();

    while(itCurrHeaderBlock != m_headerBlocks.end())
    {        
        delete *itCurrHeaderBlock;
        itCurrHeaderBlock++;
    }

and

The Stub destructor needs to clear the soap header blocks.

The line 'delete m_vSOAPHeaderBlocks[j];' needs to be commented out because this item is deleted
in ~SoapHeader().
Then add m_vSOAPHeaderBlocks.clear(); after the 'for (j = 0; j < m_vSOAPHeaderBlocks.size
(); j++)' loop.

  was:
SoapHeader::~SoapHeader() contains a memory leak. The m_headerBlocks member variable is never
cleared.

The following code needs to be added to the beginning of the destructor before 'm_headerBlocks.clear();':
    // deletion of Header Block RHA added
    list<IHeaderBlock*>::iterator itCurrHeaderBlock= m_headerBlocks.begin();

    while(itCurrHeaderBlock != m_headerBlocks.end())
    {        
        delete *itCurrHeaderBlock;
        itCurrHeaderBlock++;
    }


        Summary: Have SoapHeader destroy header blocks  (was: Memory Leak in SoapHeader destructor)

I do not believe there is any memory leaks with regards to the SOAP header blocks.  The stub
destructor cleans those up.   However, it will be looked into to have SOAPHeader delete the
header blocks.  

The reason that it was moved out is because the SOAPHeader to cleared on a Call->initialize
before serialization happens.  



> Have SoapHeader destroy header blocks
> -------------------------------------
>
>                 Key: AXISCPP-1054
>                 URL: https://issues.apache.org/jira/browse/AXISCPP-1054
>             Project: Axis-C++
>          Issue Type: Bug
>          Components: SOAP
>         Environment: Windows XP, VS6 with Compuware BoundsChecker 
>            Reporter: Ryan McCullough
>             Fix For: current (nightly)
>
>
> SoapHeader::~SoapHeader() contains a memory leak? The m_headerBlocks member variable
is never cleared.
> The following code needs to be added to the beginning of the destructor before 'm_headerBlocks.clear();':
>     // deletion of Header Block RHA added
>     list<IHeaderBlock*>::iterator itCurrHeaderBlock= m_headerBlocks.begin();
>     while(itCurrHeaderBlock != m_headerBlocks.end())
>     {        
>         delete *itCurrHeaderBlock;
>         itCurrHeaderBlock++;
>     }
> and
> The Stub destructor needs to clear the soap header blocks.
> The line 'delete m_vSOAPHeaderBlocks[j];' needs to be commented out because this item
is deleted in ~SoapHeader().
> Then add m_vSOAPHeaderBlocks.clear(); after the 'for (j = 0; j < m_vSOAPHeaderBlocks.size
(); j++)' loop.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: c-dev-help@axis.apache.org


Mime
View raw message