[PD] [Bug]Dynamic Patching causes memory leak