Add memory management  examples