remove unnecessary memset from dtor

This commit is contained in:
altalk23 2022-07-06 12:09:12 +03:00
parent 8188f957a8
commit c6c9665c65

View file

@ -46,7 +46,6 @@ types::ret{index} {class_name}::{function_name}({parameters}){const_whitespace}{
func(this{argument_comma}{arguments}); func(this{argument_comma}{arguments});
// we need to construct it back so that it uhhh ummm doesnt crash // we need to construct it back so that it uhhh ummm doesnt crash
// while going to the child destructors // while going to the child destructors
std::memset(this, 0, sizeof({class_name}));
auto thing = new (this) {class_name}(std::monostate(), sizeof({class_name})); auto thing = new (this) {class_name}(std::monostate(), sizeof({class_name}));
CCDestructor::lock(this) = true; CCDestructor::lock(this) = true;
}} }}