From 2d5673d632bae412c68276941211db0ee8b114ea Mon Sep 17 00:00:00 2001 From: kevin Date: Wed, 29 Dec 2021 21:48:14 -0500 Subject: [PATCH] cwFlowCross.cpp : Fixed memory leaks. --- cwFlowCross.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cwFlowCross.cpp b/cwFlowCross.cpp index 25cc36b..0385883 100644 --- a/cwFlowCross.cpp +++ b/cwFlowCross.cpp @@ -64,7 +64,7 @@ namespace cw for(unsigned i=0; ideviceN; ++i) if( net->deviceA[i].typeId == flow::kAudioDevTypeId ) { - mem::release(net->deviceA[i].u.a.abuf); + abuf_destroy(net->deviceA[i].u.a.abuf); } mem::release(net->deviceA); flow::destroy(net->flowH); @@ -128,7 +128,7 @@ namespace cw net->net_idx = net_idx; if((rc = flow::create( net->flowH, classCfg, networkCfg, net->deviceA, deviceN )) == kOkRC ) - net->deviceN += 1; + net->deviceN = deviceN; else { cwLogError(rc,"Flow cross index %i network created failed.",net_idx);