Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tsoc
openmm
Commits
877c2bfd
Commit
877c2bfd
authored
Dec 13, 2016
by
peastman
Committed by
GitHub
Dec 13, 2016
Browse files
Merge pull request #1690 from peastman/leak
Fixed a memory leak
parents
0071c334
5447bb74
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
platforms/cpu/src/CpuPlatform.cpp
platforms/cpu/src/CpuPlatform.cpp
+2
-0
platforms/reference/include/ReferencePlatform.h
platforms/reference/include/ReferencePlatform.h
+1
-1
No files found.
platforms/cpu/src/CpuPlatform.cpp
View file @
877c2bfd
...
...
@@ -127,6 +127,8 @@ void CpuPlatform::contextDestroyed(ContextImpl& context) const {
PlatformData
*
data
=
contextData
[
&
context
];
delete
data
;
contextData
.
erase
(
&
context
);
ReferencePlatform
::
PlatformData
*
refPlatformData
=
reinterpret_cast
<
ReferencePlatform
::
PlatformData
*>
(
context
.
getPlatformData
());
delete
refPlatformData
;
}
CpuPlatform
::
PlatformData
&
CpuPlatform
::
getPlatformData
(
ContextImpl
&
context
)
{
...
...
platforms/reference/include/ReferencePlatform.h
View file @
877c2bfd
...
...
@@ -56,7 +56,7 @@ public:
void
contextDestroyed
(
ContextImpl
&
context
)
const
;
};
class
ReferencePlatform
::
PlatformData
{
class
OPENMM_EXPORT
ReferencePlatform
::
PlatformData
{
public:
PlatformData
(
const
System
&
system
);
~
PlatformData
();
...
...
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