updated memory warning example to swift