Skip to main content

zero_data

Function zero_data 

Source
pub fn zero_data(account: &AccountView) -> ProgramResult
Expand description

Zero the data bytes of an account without changing lamports or owner.

Useful for “soft close” patterns where you want to mark an account as consumed but leave it allocated for potential reuse.