Dispose application inside a read action