Memory leak on Linux
- Dominant language
- C++
- Stars
- 2.5k
- Forks
- 232
- PR merge metrics
- No merged PRs in 30d
Description
* version: 0.6.0
* Windows: pycharm 2023.3.1 Community Edition, python 3.9
* Linux: RHEl 7.5, python 3.9
* problem: memory leak on Linux but not on Windows
Read frame codes:
```python
from decord import VideoReader
reader = VideoReader(url)
frame_count = len(reader)
frame_ids = np.linespace(0, frame_count - 1, 10, dtype=int).tolist()
frames = reader.get_batch(frame_ids).asnumpy()
```
I use decord to read video frames in a Fastapi view. There is no memory leak on Windows when debuging in pycharm, but leak on Linux when start python script directly. Memory only raise when requeset the api, without any signs of decreasing.
To debug memory leak, I call reader.__del__() after read frames. It works on Windows but meets Segmentation fault on Linux.
Finally, I use numpy.zeros() creating frames to replace decord reading frames, there is no memory leak.
Someone help me please.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.