-
Notifications
You must be signed in to change notification settings - Fork 16k
Closed
Labels
Description
What version of protobuf and what language are you using?
Version: 3.14.0/v3.15.0
Language: Python
What operating system (Linux, Windows, ...) and version?
Ubuntu Linux
What runtime / compiler are you using (e.g., python version or gcc version)
Python v3.9.5
Built protobuf schema with protoc 3.14.0
What did you do?
Steps to reproduce the behavior:
- Go to https://github.com/Atheuz/proto_leak and clone it with:
git clone https://github.com/Atheuz/proto_leak.git. - Go to the repository with
cd proto_leak. - Create a virtual environment with
virtualenv .venv --python=3.9and activate it withsource .venv/bin/activate. - Run:
pip install -r requirements.txt. (installs protobuf==3.14.0) - Run
python leak.py - Observe:
Memory consumed at the beginning 14.50390625
Memory consumed after parsed 735.421875
Memory consumed after deallocating 16.15625
- Run:
pip install protobuf==3.15.0 - Run
python leak.py - Observe:
Memory consumed at the beginning 17.1953125
Memory consumed after parsed 636.6875
Memory consumed after deallocating 536.734375
What did you expect to see
In 3.15.0, I expected it to free basically all memory used for the list of pb items.
What did you see instead?
In 3.15.0, it retains 500+ MB of memory that is not retained in 3.14.0.