Rantanen / intercom

Object based cross-language FFI for Rust
MIT License
63 stars 7 forks source link

Fix memory leaks #99

Closed Rantanen closed 4 years ago

Rantanen commented 5 years ago

Decided to check the test output on TravisCI. To my surprise Valgrid reported:

==9307== LEAK SUMMARY:
==9307==    definitely lost: 672 bytes in 12 blocks
==9307==    indirectly lost: 43 bytes in 3 blocks

I was expecting leaks to fail the test run so haven't paid that much attention to memory management. There might be some missing Releases somewhere. Hopefully that's all we are missing - although I wouldn't be surprised if some of the InterfacePtr-ComItf-ComRc conversions end up leaking references.

We should fix those leaks and then try to get Valgrind to fail the test run if it finds leaks so we will find these issues faster the next time.