DPF

DISTRHO Plugin Framework
Log | Files | Refs | Submodules | README | LICENSE

commit fb72b8610b0dc1ec25aa7d4a25196111c2dbe6ca
parent 8cc6eb8f2ff7ac17df2deaf9a17f7e150994b149
Author: Jean Pierre Cimalando <jp-dev@inbox.ru>
Date:   Mon, 24 May 2021 18:51:26 +0200

msvc: prefer malloc to alloca

Diffstat:
Mdistrho/src/DistrhoUILV2.cpp | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/distrho/src/DistrhoUILV2.cpp b/distrho/src/DistrhoUILV2.cpp @@ -289,7 +289,7 @@ protected: // reserve atom space const size_t atomSize = sizeof(LV2_Atom) + msgSize; - char* atomBuf = (char*)alloca(atomSize); + char* atomBuf = (char*)malloc(atomSize); std::memset(atomBuf, 0, atomSize); // set atom info @@ -302,6 +302,9 @@ protected: // send to DSP side fWriteFunction(fController, eventInPortIndex, atomSize, fURIDs.atomEventTransfer, atom); + + // free atom space + free(atomBuf); } #if DISTRHO_PLUGIN_WANT_MIDI_INPUT