Memory leak on inkscape stable when registering fonts with pango
Bug #1388148 reported by
Andre Barros
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Inkscape |
New
|
Undecided
|
Unassigned |
Bug Description
For some reason the memory is not freed as it, probably, should be in accordance to pango developer page.
I'm submitting two patches: one for this and another one for fonts filtering by both whitelist and blacklist.
On my system, openSUSE, I have TeX installed and the difference on inkscape loading is sensible with the patches.
Also, I am not sure, but the first patch seems to fix a problem I had, i.e., slowing down after many inkscape restarting. Perhaps, it was related to the leak.
To post a comment you must log in.
One last advice, the second patch was created with only unix/linux in mind. It needs some adjustments to work with windows on, at least 2 points:
1) because windows use \r\n
- if (pos[-1] == '\n' && pos[i] == '\n')
+ if (iscntrl (pos[-1]) && iscntrl (pos[i]))
2) because I am not aware of how inkscape looks for files on windows inkscape/ ",
- char * home_dir = getenv ("HOME");
- const char * user_config_dir = "/.config/
+ char * home_dir = ".\\";
+ const char * user_config_dir = "\\where is inkscape config\\",