clear memory after app client disconnected