python-iwlib icon indicating copy to clipboard operation
python-iwlib copied to clipboard

iwlib/utils.h: Avoid leaking reference to object

Open willnewton opened this issue 8 years ago • 1 comments

If we don't decrement the reference count of the object we insert into the dictionary then we will leak the object later.

http://nedbatchelder.com/blog/200911/memory_leak_mystery.html

willnewton avatar Oct 04 '16 15:10 willnewton

Thanks Will! I've been run off my feet recently with moving, but I'll try to look at this over the weekend.

For what it's worth, I do have a branch for moving to CFFI instead, which would mean no more reference count shenanigans. Maybe it's time I start trying to push that out?

nhoad avatar Oct 26 '16 22:10 nhoad