Release memory buffer automatically