memory class is public property of MainActivity