[prev in list] [next in list] [prev in thread] [next in thread] 

List:       vtk-developers
Subject:    [vtk-developers] [VTK 0013908]: Memory Leak in the following code
From:       Mantis Bug Tracker <mantis () public ! kitware ! com>
Date:       2013-02-26 22:59:17
Message-ID: 5503f7fb94a3b3475da4471b9ef1b706 () vtk ! org
[Download RAW message or body]


The following issue has been SUBMITTED. 
====================================================================== 
http://vtk.org/Bug/view.php?id=13908 
====================================================================== 
Reported By:                Micah Chambers
Assigned To:                
====================================================================== 
Project:                    VTK
Issue ID:                   13908
Category:                   (No Category)
Reproducibility:            have not tried
Severity:                   minor
Priority:                   normal
Status:                     backlog
Project:                    TBD 
Type:                       performance 
Resolution:                 open
Fixed in Version:           
====================================================================== 
Date Submitted:             2013-02-26 17:59 EST
Last Modified:              2013-02-26 17:59 EST
====================================================================== 
Summary:                    Memory Leak in the following code
Description: 
vtkDataReader.cxx has a memory leak here: 'decoded' is allocated but never
deleted. Line 1749 of the git version.

    else 
      {    
      // read in newline
      vtkStdString s;
      my_getline(*(this->IS), s);

      for (int i=0; i<numTuples; i++) 
        {    
        for (int j=0; j<numComp; j++) 
          {    
          my_getline(*(this->IS), s);
          int length = static_cast<int>(s.length());
          char* decoded = new char[length + 1];
          int decodedLength = this->DecodeString(decoded, s.c_str());
          vtkStdString decodedStr(decoded, decodedLength);
          ((vtkStringArray*)array)->InsertNextValue(decodedStr);
          }    
        }    
      }    
    }  
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2013-02-26 17:59 Micah Chambers New Issue                                    
======================================================================

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtk-developers

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic