make sure all memory in init before use