Skip to content

🐛 fix per-frame memory leak in raw callback dispatch - #78

Open
rayannott wants to merge 1 commit into
Fraunhofer-FIT-DIEN:mainfrom
rayannott:fix/raw-callback-refleak
Open

🐛 fix per-frame memory leak in raw callback dispatch#78
rayannott wants to merge 1 commit into
Fraunhofer-FIT-DIEN:mainfrom
rayannott:fix/raw-callback-refleak

Conversation

@rayannott

Copy link
Copy Markdown

Raw callbacks (on_receive_raw/on_send_raw on both Connection and Server) leaked a memoryview + bytes per dispatched frame: both references were created via the C API and never released. Replaced with py::bytes, which owns and releases the reference.

Measured at 150 msg/s for 60 s with an empty callback: 365 B/msg leaked before, 0 B/msg after; tests/test.py passes unchanged.

Fixes #77

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

on_receive_raw / on_send_raw leak a memoryview + bytes per frame (missing Py_DECREF in raw callback dispatch)

1 participant