Merge "Free memory when it is no more used" am: b9de32f6f0
am: d3c8f5e75d

Change-Id: Ieecc2693a118befd3e0af7b0c689946c052219c6