Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Christian Butz
VTK
Commits
3c034c84
Commit
3c034c84
authored
Jul 10, 2018
by
Ken Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix some reported memory leaks
mostly straight gorward memory leaks
parent
fa3a8329
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
29 additions
and
9 deletions
+29
-9
Filters/Core/Testing/Cxx/TestResampleToImage2D.cxx
Filters/Core/Testing/Cxx/TestResampleToImage2D.cxx
+4
-1
Filters/Texture/Testing/Cxx/TestScalarsToTexture.cxx
Filters/Texture/Testing/Cxx/TestScalarsToTexture.cxx
+4
-1
IO/Export/vtkOBJExporter.cxx
IO/Export/vtkOBJExporter.cxx
+2
-0
IO/Geometry/Testing/Cxx/TestOBJPolyDataWriter.cxx
IO/Geometry/Testing/Cxx/TestOBJPolyDataWriter.cxx
+9
-5
IO/PDAL/Testing/Cxx/TestPDALReader.cxx.in
IO/PDAL/Testing/Cxx/TestPDALReader.cxx.in
+1
-0
IO/PDAL/vtkPDALReader.cxx
IO/PDAL/vtkPDALReader.cxx
+4
-2
IO/XML/Testing/Cxx/TestXMLWriteRead.cxx
IO/XML/Testing/Cxx/TestXMLWriteRead.cxx
+1
-0
IO/XMLParser/vtkXMLDataParser.cxx
IO/XMLParser/vtkXMLDataParser.cxx
+4
-0
No files found.
Filters/Core/Testing/Cxx/TestResampleToImage2D.cxx
View file @
3c034c84
...
...
@@ -25,7 +25,10 @@
int
TestResampleToImage2D
(
int
argc
,
char
*
argv
[])
{
vtkNew
<
vtkXMLUnstructuredGridReader
>
reader
;
reader
->
SetFileName
(
vtkTestUtilities
::
ExpandDataFileName
(
argc
,
argv
,
"Data/delaunay3d.vtu"
));
char
*
fname
=
vtkTestUtilities
::
ExpandDataFileName
(
argc
,
argv
,
"Data/delaunay3d.vtu"
);
reader
->
SetFileName
(
fname
);
delete
[]
fname
;
vtkNew
<
vtkResampleToImage
>
resample
;
resample
->
UseInputBoundsOff
();
...
...
Filters/Texture/Testing/Cxx/TestScalarsToTexture.cxx
View file @
3c034c84
...
...
@@ -30,7 +30,10 @@
int
TestScalarsToTexture
(
int
argc
,
char
*
argv
[])
{
vtkNew
<
vtkXMLPolyDataReader
>
reader
;
reader
->
SetFileName
(
vtkTestUtilities
::
ExpandDataFileName
(
argc
,
argv
,
"Data/can_slice.vtp"
));
char
*
fname
=
vtkTestUtilities
::
ExpandDataFileName
(
argc
,
argv
,
"Data/can_slice.vtp"
);
reader
->
SetFileName
(
fname
);
delete
[]
fname
;
vtkNew
<
vtkColorTransferFunction
>
stc
;
stc
->
SetVectorModeToMagnitude
();
...
...
IO/Export/vtkOBJExporter.cxx
View file @
3c034c84
...
...
@@ -46,6 +46,8 @@ vtkOBJExporter::vtkOBJExporter()
vtkOBJExporter
::~
vtkOBJExporter
()
{
delete
[]
this
->
OBJFileComment
;
delete
[]
this
->
MTLFileComment
;
delete
[]
this
->
FilePrefix
;
}
...
...
IO/Geometry/Testing/Cxx/TestOBJPolyDataWriter.cxx
View file @
3c034c84
...
...
@@ -40,11 +40,15 @@ int TestOBJPolyDataWriter(int argc, char* argv[])
sphereSource
->
SetPhiResolution
(
16
);
vtkNew
<
vtkJPEGReader
>
textReader
;
textReader
->
SetFileName
(
vtkTestUtilities
::
ExpandDataFileName
(
argc
,
argv
,
"Data/NE2_ps_bath_small.jpg"
));
std
::
string
tmpDir
(
vtkTestUtilities
::
GetArgOrEnvOrDefault
(
"-T"
,
argc
,
argv
,
"VTK_TEMP_DIR"
,
"Testing/Temporary"
));
char
*
fname
=
vtkTestUtilities
::
ExpandDataFileName
(
argc
,
argv
,
"Data/NE2_ps_bath_small.jpg"
);
textReader
->
SetFileName
(
fname
);
delete
[]
fname
;
char
*
tname
=
vtkTestUtilities
::
GetArgOrEnvOrDefault
(
"-T"
,
argc
,
argv
,
"VTK_TEMP_DIR"
,
"Testing/Temporary"
);
std
::
string
tmpDir
(
tname
);
delete
[]
tname
;
std
::
string
filename
=
tmpDir
+
"/TestOBJPolyDataWriter_write.obj"
;
vtkNew
<
vtkOBJWriter
>
writer
;
...
...
IO/PDAL/Testing/Cxx/TestPDALReader.cxx.in
View file @
3c034c84
...
...
@@ -41,6 +41,7 @@ int TestPDALReader_@VTK_PDAL_READER_POSTFIX@(int argc, char **argv)
vtkNew<vtkPDALReader> reader;
//Select source file
reader->SetFileName(path);
delete [] path;
//Read the output
reader->Update();
...
...
IO/PDAL/vtkPDALReader.cxx
View file @
3c034c84
...
...
@@ -67,8 +67,10 @@ vtkPDALReader::vtkPDALReader()
//----------------------------------------------------------------------------
vtkPDALReader
::~
vtkPDALReader
()
{
if
(
!
this
->
FileName
)
delete
[]
this
->
FileName
;
if
(
this
->
FileName
)
{
delete
[]
this
->
FileName
;
}
}
//----------------------------------------------------------------------------
...
...
IO/XML/Testing/Cxx/TestXMLWriteRead.cxx
View file @
3c034c84
...
...
@@ -32,6 +32,7 @@ int TestXMLWriteRead(int argc, char* argv[])
char
*
tempDir
=
vtkTestUtilities
::
GetArgOrEnvOrDefault
(
"-T"
,
argc
,
argv
,
"VTK_TEMP_DIR"
,
"Testing/Temporary"
);
std
::
string
fileName
(
tempDir
);
delete
[]
tempDir
;
int
statusFloat
,
statusDouble
;
...
...
IO/XMLParser/vtkXMLDataParser.cxx
View file @
3c034c84
...
...
@@ -1186,6 +1186,10 @@ void vtkXMLDataParser::FreeAsciiBuffer()
vtkTemplateMacro
(
vtkXMLDataParserFreeAsciiBuffer
(
static_cast
<
VTK_TT
*>
(
buffer
))
);
case
VTK_BIT
:
vtkXMLDataParserFreeAsciiBuffer
(
static_cast
<
unsigned
char
*>
(
buffer
));
break
;
}
this
->
AsciiDataBuffer
=
nullptr
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment