Browse Source
Explicitly delete the copy constructors and copy assignment operators for fir_filter and fir_resampler, both of which own dynamically allocated coefficient arrays released by their destructors. The implicitly generated copy operations would shallow-copy the coefficient pointers, leaving multiple instances referring to the same allocations and potentially causing double deletion. Since neither class is intended to be copied or assigned, prohibit both operations at compile time to prevent unsafe resource ownership. cppcheck identified the missing copy constructors and assignment operators with its noCopyConstructor and noOperatorEq warnings. Signed-off-by: Robin Getz <rgetz503@gmail.com>chirpmodem-v8.0.0
1 changed files with 5 additions and 0 deletions
Loading…
Reference in new issue