Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VTK
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jean-Christophe Fillion-Robin
VTK
Commits
74cb04a4
Commit
74cb04a4
authored
12 years ago
by
David Gobbi
Browse files
Options
Downloads
Patches
Plain Diff
Fix a memory leak in TestButterflyScalars.
Change-Id: Ia43920e2f2019d22cc938171d490e2b228a1f9d1
parent
8c73f97f
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Filters/Modeling/Testing/Cxx/TestButterflyScalars.cxx
+3
-14
3 additions, 14 deletions
Filters/Modeling/Testing/Cxx/TestButterflyScalars.cxx
with
3 additions
and
14 deletions
Filters/Modeling/Testing/Cxx/TestButterflyScalars.cxx
+
3
−
14
View file @
74cb04a4
...
...
@@ -55,31 +55,20 @@ int TestButterflyScalars(int argc, char * argv[])
colors
->
SetNumberOfTuples
(
originalMesh
->
GetNumberOfPoints
());
colors
->
SetName
(
"Colors"
);
//Creating an array to store the values according to which the
//colors are selected.
//Values are inserted for each of the points in the polydata
int
*
colorAT
=
new
int
[
originalMesh
->
GetNumberOfPoints
()];
for
(
int
i
=
0
;
i
<
originalMesh
->
GetNumberOfPoints
();
i
++
)
{
colorAT
[
i
]
=
i
;
}
int
activationTime
;
//Loop to select colors for each of the points in the polydata.
for
(
int
i
=
0
;
i
<
originalMesh
->
GetNumberOfPoints
();
i
++
)
{
activationTime
=
colorAT
[
i
];
if
(
activationTime
>
0
&&
activationTime
<
5
)
if
(
i
>
0
&&
i
<
5
)
{
//Black
colors
->
InsertTuple3
(
i
,
255
,
255
,
0
);
}
else
if
(
activationTime
>
4
&&
activationTime
<
10
)
else
if
(
i
>
4
&&
i
<
10
)
{
//Blue
colors
->
InsertTuple3
(
i
,
0
,
0
,
255
);
}
else
if
(
activationTime
>
9
&&
activationTime
<
300
)
else
if
(
i
>
9
&&
i
<
300
)
{
//Red
colors
->
InsertTuple3
(
i
,
255
,
0
,
0
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment