connectivitylayer/isce/isirouter_dll/src/isimsgqueue.cpp
changeset 9 8486d82aef45
parent 0 63b37f68c1ce
equal deleted inserted replaced
8:6295dc2169f3 9:8486d82aef45
    64     {
    64     {
    65     
    65     
    66     C_TRACE( ( _T( "DISIMsgQueue::~DISIMsgQueue 0x%x %d>" ), this, iShCount ) );
    66     C_TRACE( ( _T( "DISIMsgQueue::~DISIMsgQueue 0x%x %d>" ), this, iShCount ) );
    67     ASSERT_RESET_ALWAYS( iShCount == 0, ( EISIMsgQueueNotEmpty | EDISIMsgQueueTraceId << KClassIdentifierShift ) );
    67     ASSERT_RESET_ALWAYS( iShCount == 0, ( EISIMsgQueueNotEmpty | EDISIMsgQueueTraceId << KClassIdentifierShift ) );
    68     // NOTE! This does not deallocate the blocks from the allocated memory just the pointers!
    68     // NOTE! This does not deallocate the blocks from the allocated memory just the pointers!
       
    69     // Take each individual pointer from the array and free delete them.
    69     for( TInt i( 0 ); i < iSize; ++i )
    70     for( TInt i( 0 ); i < iSize; ++i )
    70         {
    71         {
    71         TDes8* temp = iShRingBuffer[ i ];
    72         TDes8* temp = iShRingBuffer[ i ];
    72         if( temp )
    73         if( temp )
    73             {
    74             {
    77             }
    78             }
    78         }
    79         }
    79     if( iShRingBuffer )
    80     if( iShRingBuffer )
    80         {
    81         {
    81         C_TRACE( ( _T( "DISIMsgQueue::~DISIMsgQueue iShRingBuffer 0x%x iShRingBuffer[0] 0x%x" ), iShRingBuffer, iShRingBuffer[0] ) );
    82         C_TRACE( ( _T( "DISIMsgQueue::~DISIMsgQueue iShRingBuffer 0x%x iShRingBuffer[0] 0x%x" ), iShRingBuffer, iShRingBuffer[0] ) );
       
    83         // Delete the space reserved for the array. Marks it as non-used do not set to NULL.
    82         delete [] iShRingBuffer;
    84         delete [] iShRingBuffer;
    83         iShRingBuffer = NULL;
    85 //        iShRingBuffer = NULL;
    84         }
    86         }
    85 
    87 
    86     iSize = 0;
    88     iSize = 0;
    87     iShInputIndex = 0;
    89     iShInputIndex = 0;
    88     iShOutputIndex = 0;
    90     iShOutputIndex = 0;