Ask Your Question
0

Freeing Memory with Python

asked 2016-06-21 15:00:02 -0600

oweiss gravatar image

I'm using OpenCV 3.1, Python 3.5, and Windows 7. When I load large pictures I get an insufficient memory error. I believe I would be able to avoid this if I were able to free the pictures I loaded in OpenCV before I moved onto my next step, but I don't know if there's a way to do this using Python. Is there?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2016-06-22 16:16:15 -0600

Have you tried dereferencing the images?

image = None

Or use the del keyword

del image

This might not free memory being held by opencv, but it's a good first try.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-06-21 15:00:02 -0600

Seen: 4,392 times

Last updated: Jun 21 '16