Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mantid
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review 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
mantidproject
mantid
Commits
bfcb08b8
Commit
bfcb08b8
authored
9 years ago
by
Nick Draper
Browse files
Options
Downloads
Patches
Plain Diff
re #13928 move code to aviod possible memory leak
parent
c481d6e5
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Vates/VatesAPI/src/vtkMDHistoQuadFactory.cpp
+6
-5
6 additions, 5 deletions
Vates/VatesAPI/src/vtkMDHistoQuadFactory.cpp
with
6 additions
and
5 deletions
Vates/VatesAPI/src/vtkMDHistoQuadFactory.cpp
+
6
−
5
View file @
bfcb08b8
...
...
@@ -92,6 +92,12 @@ namespace Mantid
coord_t
incrementX
=
(
maxX
-
minX
)
/
static_cast
<
coord_t
>
(
nBinsX
);
coord_t
incrementY
=
(
maxY
-
minY
)
/
static_cast
<
coord_t
>
(
nBinsY
);
boost
::
scoped_ptr
<
MDHistoWorkspaceIterator
>
iterator
(
dynamic_cast
<
MDHistoWorkspaceIterator
*>
(
createIteratorWithNormalization
(
m_normalizationOption
,
m_workspace
.
get
())));
if
(
!
iterator
)
{
throw
std
::
runtime_error
(
"Could not convert IMDIterator to a MDHistoWorkspaceIterator"
);
}
const
int
imageSize
=
(
nBinsX
)
*
(
nBinsY
);
vtkPoints
*
points
=
vtkPoints
::
New
();
points
->
Allocate
(
static_cast
<
int
>
(
imageSize
));
...
...
@@ -119,11 +125,6 @@ namespace Mantid
double
progressFactor
=
0.5
/
double
(
nBinsX
);
double
progressOffset
=
0.5
;
boost
::
scoped_ptr
<
MDHistoWorkspaceIterator
>
iterator
(
dynamic_cast
<
MDHistoWorkspaceIterator
*>
(
createIteratorWithNormalization
(
m_normalizationOption
,
m_workspace
.
get
())));
if
(
!
iterator
)
{
throw
std
::
runtime_error
(
"Could not convert IMDIterator to a MDHistoWorkspaceIterator"
);
}
size_t
index
=
0
;
for
(
int
i
=
0
;
i
<
nBinsX
;
i
++
)
...
...
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