Ask Your Question

uncle4's profile - activity

2013-07-02 11:21:36 -0600 asked a question running sample motempl.py leaks memory

I'm running Ubuntu (3.5.0 kernel), python 2.7.3 and openCV 2.4.9.

When I run the unaltered motempl.py script found in .../samples/python/ I begin leaking memory almost immediately. If I let the script run for any amount of time, it eventually throws an exception (cannot allocate memory) and dies. 'top' shows python going from 39MB resident memory at T0, to 175MB at T120sec.

I can comment out the call to 'cv.UpdateMotionHistory' and the leak seems to stop.

I've poked around a little with objgraph.... it looks like I'm leaking tuples, but IDing which tuples has proven beyond my skills.

I've googled around, but haven't seen this question (or any answers/observations) regarding it.

Any suggestions for how to stop leaking (short of not calling UpdateMotionHistory) appreciated.