Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
VTK
VTK
Commits
95f25a6a
Commit
95f25a6a
authored
Nov 07, 2002
by
Berk Geveci
Browse files
Fixed leak when empty input.
parent
05c30948
Changes
1
Hide whitespace changes
Inline
Side-by-side
Graphics/vtkStreamTracer.cxx
View file @
95f25a6a
...
...
@@ -28,7 +28,7 @@
#include
"vtkRungeKutta4.h"
#include
"vtkRungeKutta45.h"
vtkCxxRevisionMacro
(
vtkStreamTracer
,
"1.1
3
"
);
vtkCxxRevisionMacro
(
vtkStreamTracer
,
"1.1
4
"
);
vtkStandardNewMacro
(
vtkStreamTracer
);
vtkCxxSetObjectMacro
(
vtkStreamTracer
,
Integrator
,
vtkInitialValueProblemSolver
);
...
...
@@ -532,8 +532,6 @@ void vtkStreamTracer::Integrate(vtkDataArray* seedSource,
vtkDataArray
*
inVectors
=
0
;
int
direction
=
1
;
// Used in GetCell()
vtkGenericCell
*
cell
=
vtkGenericCell
::
New
();
// Set the function set to be integrated
vtkInterpolatedVelocityField
*
func
=
vtkInterpolatedVelocityField
::
New
();
...
...
@@ -565,6 +563,7 @@ void vtkStreamTracer::Integrate(vtkDataArray* seedSource,
if
(
numInputs
==
0
)
{
vtkErrorMacro
(
"No appropriate inputs have been found. Can not execute."
);
func
->
Delete
();
return
;
}
...
...
@@ -578,10 +577,12 @@ void vtkStreamTracer::Integrate(vtkDataArray* seedSource,
{
vtkErrorMacro
(
"No integrator is specified."
);
func
->
Delete
();
cell
->
Delete
();
return
;
}
// Used in GetCell()
vtkGenericCell
*
cell
=
vtkGenericCell
::
New
();
// Create a new integrator, the type is the same as Integrator
vtkInitialValueProblemSolver
*
integrator
=
this
->
GetIntegrator
()
->
NewInstance
();
...
...
Write
Preview
Supports
Markdown
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