Daiki Ueno <[email protected]> writes: > Well, though it looks the code should work, how is the impact of the > memory leaks? Since 'xgettext' is not a long running program (nor a > library), can't we simply ignore it if it is not severe?
Yes, of course. It is not severe because only can be noticeable when xgettext parses files with lots of strings not stored with any alternative of the struct callshape, but stored in by arglist_parser (e.g. a java project with a different ngettext function not related to GNU gettext though they want NLS). OTOH, I think code correctness should also matter, even more when correct code does not have a noticeable decrement of the execution speed neither It loss readability. This code also could be used by a library, think about a GPL IDE that wants POT file generation on the fly. You could fork a new process each time you want to parse the files, or you can build xgettext as a library (very easy with automake and libtool) and only call functions. This way the leak would be exposed to the application. Best regards, Miguel
