Skip to main content

zero_init

Function zero_init 

Source
pub fn zero_init(data: &mut [u8])
Expand description

Zero-initialize a byte slice. Must be called before write_header.

Solana does NOT guarantee zeroed account data on creation. Always call this on freshly allocated accounts.