eosio Multi Index Clear

template<name::raw A, typename B, typename... C> void clear_table(multi_index<A, B, C...>* table) { 
	auto it = table->begin(); 
	while (it != table->end()) { it = table->erase(it); } 
};

clear_table(&_table);
S.Mahdi