Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Heisch, Benjamin
APAL
Commits
945476a3
Commit
945476a3
authored
Aug 07, 2020
by
Benjamin Heisch
Browse files
fixed memory leak!
parent
fb4d1776
Changes
1
Hide whitespace changes
Inline
Side-by-side
formats/vst2/tests/VST2Module.hpp
View file @
945476a3
...
...
@@ -84,8 +84,7 @@ public:
return
true
;
}
inline
bool
allocate
(
size_t
_samplesize
)
{
if
(
inData
!=
nullptr
||
outData
!=
nullptr
)
this
->
free
();
this
->
free
();
this
->
samplesize
=
_samplesize
;
inData
=
new
float
*
[
effect
->
numInputs
];
outData
=
new
float
*
[
effect
->
numOutputs
];
...
...
@@ -102,12 +101,14 @@ public:
if
(
inData
[
i
]
!=
nullptr
)
delete
[]
inData
[
i
];
delete
[]
inData
;
inData
=
nullptr
;
}
if
(
outData
!=
nullptr
)
{
for
(
int
i
=
0
;
i
<
effect
->
numOutputs
;
i
++
)
if
(
outData
[
i
]
!=
nullptr
)
delete
[]
outData
[
i
];
delete
[]
outData
;
outData
=
nullptr
;
}
return
true
;
}
...
...
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