use explicit memory management