Fix memory leak in _DynamicCapabilityClient._send_helper() (#398)

The heap-allocated Request object was never freed after send().
  Each RPC call leaked ~72 bytes, growing linearly with usage.

  Added del request after request.send() to free the Request once
  the RemotePromise has been constructed.
This commit is contained in:
ed-tsn
2026-07-03 09:08:47 +02:00
committed by GitHub
parent 6aa1849da6
commit e2aaef8b6c

View File

@@ -2320,7 +2320,9 @@ cdef class _DynamicCapabilityClient:
self._set_fields(request, name, args, kwargs)
return _RemotePromise()._init(request.send(), self)
cdef _RemotePromise result = _RemotePromise()._init(request.send(), self)
del request
return result
cpdef _request_helper(self, name, firstSegmentWordSize, args, kwargs):
# if word_count is None: