[BZ#789323] memory leak, can't locate sub element
Submitted by Oren Ben-Kiki
Link to original bug (#789323)
Description
Created attachment 362058 Sample program
My main issue is that librsvg seems to not find sub elements by id. Specifically, rsvg_handle_has_sub returns false, and therefore querying for the element's size and position fails. I'm probably doing something wrong here... or is this a bug? I really want the ability to access sub-elements size and position (by id or name or something along these lines), so any advice/workaround to make this work would be appreciated.
The secondary issue is that librsvg causes memory leaks, or at least causes valgrind to think there are leaks, even for a minimal program (creating, writing into, closing, and destroying an RSVG handle). I can easily work around this with a suppression file, but... Is there some additional cleanup function I should call to release all allocated memory?
I am using version 2.40.13 on the Windows Linux subsystem, if that matters.
The attached cheese.zip file contains the C++ file demonstrating both issues, a shell script that compiles and runs it, and the output I got.
Attachment 362058, "Sample program":
cheese.zip