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
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
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
Bryn Lloyd
VTK
Commits
a42b02b2
Commit
a42b02b2
authored
1 year ago
by
David Gobbi
Browse files
Options
Downloads
Patches
Plain Diff
Free the wrapper executable options at exit
This makes it easier to track leaks in valgrind.
parent
ac0fb52e
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Wrapping/Tools/vtkParseMain.c
+21
-0
21 additions, 0 deletions
Wrapping/Tools/vtkParseMain.c
with
21 additions
and
0 deletions
Wrapping/Tools/vtkParseMain.c
+
21
−
0
View file @
a42b02b2
...
...
@@ -420,6 +420,26 @@ static int parse_check_options(int argc, char* argv[], int multi)
return
i
;
}
/* Free memory used by OptionInfo struct, and clear all pointers */
static
void
parse_free_options
(
void
)
{
free
(
options
.
Files
);
options
.
Files
=
NULL
;
options
.
NumberOfFiles
=
0
;
options
.
InputFileName
=
NULL
;
options
.
OutputFileName
=
NULL
;
options
.
DependencyFileName
=
NULL
;
free
(
options
.
HintFileNames
);
options
.
HintFileNames
=
NULL
;
options
.
NumberOfHintFileNames
=
0
;
free
(
options
.
HierarchyFileNames
);
options
.
HierarchyFileNames
=
NULL
;
options
.
NumberOfHierarchyFileNames
=
0
;
}
/* Return a pointer to the static OptionInfo struct */
const
OptionInfo
*
vtkParse_GetCommandLineOptions
(
void
)
{
...
...
@@ -434,6 +454,7 @@ int vtkParse_FinalizeMain(int ret)
}
vtkParse_FinalizeDependencyTracking
();
vtkParse_FreeStringCache
(
&
argv_strings
);
parse_free_options
();
return
ret
;
}
...
...
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