Revert "Solve three memory leaks related to PatchCache"

This reverts commit 70d9e80ee14e9cf0b1570b69438afe5c754d5cf9.

Change-Id: Iccb0131e4c949c3bec4d86b9b632843fd45dac77