-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Calling keep() produces memory leak in Python #3164
Comments
I can't recreate this behavior. import pyrealsense2 as rs
pipe = rs.pipeline()
pipe.start()
df = rs.decimation_filter()
while (True):
f = pipe.wait_for_frames()
f.keep()
d = f.get_depth_frame()
if d:
f2 = df.process(d)
f2.keep() stabilizes memory-wise at < 50MB on both Python 2 and Python 3.6 in debug and release modes |
@krejov100 - I'd like to double check the issue is real before merging #3174 |
Yep so I found the issue was in fact pickling the numpy array. Numpy recently had a regression in 1.16.0 |
D400, OS independent, PC/UpBoard, Python
This is an issue that follows up to the following merged pull request #1015. There needs to be a mechanism added to handle the release of the data once its use is finished with. I am not able to find a python call to release said kept frame, resulting in a severe memory leak which garbage collection is not able to handle. Having looked through rs_frame.hpp, I believe there needs to be a corresponding call to rs2_release_frame which is currently done in the C++ destructor.
The text was updated successfully, but these errors were encountered: