Make changes for all example codes with managed memory.