Skip to content

Commit

Permalink
fix aligned delete
Browse files Browse the repository at this point in the history
  • Loading branch information
lkct committed Jul 21, 2022
1 parent 4f4339c commit 6f93ce8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions hs_detection/detect/Detection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ namespace HSDetection
delete[] spikeArea;
delete[] hasAHP;

delete[] scale;
delete[] offset;
operator delete[](scale, align_val_t(channelAlign * sizeof(IntVolt)));
operator delete[](offset, align_val_t(channelAlign * sizeof(IntVolt)));
}

void Detection::step(FloatRaw *traceBuffer, IntFrame chunkStart, IntFrame chunkLen)
Expand Down
2 changes: 1 addition & 1 deletion hs_detection/detect/RollingArray.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ namespace HSDetection
{
arrayBuffer = new (memAlign) IntVolt[(IntCalc)(frameMask + 1) * numChannels];
}
~RollingArray() { delete[] arrayBuffer; }
~RollingArray() { operator delete[](arrayBuffer, memAlign); }

// copy constructor deleted to protect buffer
RollingArray(const RollingArray &) = delete;
Expand Down

0 comments on commit 6f93ce8

Please sign in to comment.