go-qml / qml

QML support for the Go language
Other
1.96k stars 189 forks source link

cpp/capi.cpp: fix ImageProvider leak #88

Closed cookieo9 closed 9 years ago

cookieo9 commented 9 years ago

GoImageProvider had a memory leak where it got a pointer to a QImage, and never freed it. Qt already has a refcounting system in place so every QImage is actually a pointer to pixel data, but it relies on the destructor for every QImage instance to be called.