Browse Source
Explicitly delete the copy constructor and copy assignment operator for ATVDemodSink, which manages dynamically allocated memory and other resources. The implicitly generated copy operations could shallow-copy owned resources, leaving multiple ATVDemodSink instances referring to the same resources and potentially causing invalid ownership or double deletion. Since ATVDemodSink is not intended to be copied or assigned, prohibit both operations at compile time, turning potential runtime errors into compile-time errors. cppcheck identified the missing copy constructor and assignment operator with its noCopyConstructor and noOperatorEq warnings. Signed-off-by: Robin Getz <rgetz503@gmail.com>chirpmodem-v8.0.0
1 changed files with 3 additions and 1 deletions
Loading…
Reference in new issue