         queue: DispatchQueue? = nil,
         completionHandler: @escaping (RSerial.ValueType?, CallError<ESerial.ValueType>?) -> Void
     ) -> Self {
-        request.setCompletionHandler(queue: queue, completionHandler: .dataCompletionHandler({ response in
+        request.setCompletionHandler(queue: queue, completionHandler: .dataCompletionHandler({ [weak self] response in
+            guard let strongSelf = self else {
+                completionHandler(nil, .clientError(DropboxTransportClientError.objectAlreadyDeinit))
+                return
+            }
             if let error = response.error {
-                completionHandler(nil, self.handleResponseError(response.response, data: response.data, error: error))
+                completionHandler(nil, strongSelf.handleResponseError(response.response, data: response.data, error: error))
             } else {
-                completionHandler(self.responseSerializer.deserialize(SerializeUtil.parseJSON(response.data!)), nil)
-            }
+                completionHandler(strongSelf.responseSerializer.deserialize(SerializeUtil.parseJSON(response.data!)), nil)
+            }
+            strongSelf.cleanupSelfRetain()
         }))
         return self
     }


        return "";
    }
}

/// An "rpc-style" request

        queue: DispatchQueue? = nil,
        completionHandler: @escaping (RSerial.ValueType?, CallError<ESerial.ValueType>?) -> Void
    ) -> Self {
        request.setCompletionHandler(queue: queue, completionHandler: .dataCompletionHandler({ [weak self] response in
            guard let strongSelf = self else {
                completionHandler(nil, .clientError(DropboxTransportClientError.objectAlreadyDeinit))
                return
            }
            if let error = response.error {
                completionHandler(nil, strongSelf.handleResponseError(response.response, data: response.data, error: error))
            } else {
                completionHandler(strongSelf.responseSerializer.deserialize(SerializeUtil.parseJSON(response.data!)), nil)
            }
            strongSelf.cleanupSelfRetain()
        }))
        return self
    }
