There is no point in rewriting this code; it should be ported to GOption, which recently added functions required to properly support Windows.
Regards, Krzysztof From: Johan Engelen Sent: 2014-06-10 19:51 To: inkscape-devel@lists.sourceforge.net; neandertalspeople@...400... Subject: Re: [Inkscape-devel] Some memory leaks in replaceArgs function ( main.cpp ) Actually, all your changes are incorrect. Your patch is deleting memory which the code still holds pointers to. The code is quite bad indeed, but should be fixed differently. At the end of the method, all memory that the parser array has pointers to should be freed. The problem is that these pointers point to memory blocks that have been allocated differently, or point to memory locations within an allocated array. It's a mess. The whole function should be rewritten. Please create a bug report for it.
regards, Johan
On 10-6-2014 19:35, Johan Engelen wrote:
On 10-6-2014 17:29, Guiu Rocafort wrote:
Hi !
Making a simple check to see if all the new operators are freed using delete i found that there are some memory leaks in main.cpp, in the function replaceArgs ( which only affects the windows version of inkscape ).
I've added the missing delete operators and those memory leaks should be fixed. I attach the .patch file, if you want me to fill a bug report and then submit the patch instead please tell me.
Did you test your patch? While you are right that there are some memleaks, there are less than you think there are :) (e.g. your "delete[] block;" on line 1984 is wrong)
I'll rework and commit it.
regards, Johan
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions Find What Matters Most in Your Big Data with HPCC Systems Open Source. Fast. Scalable. Simple. Ideal for Dirty Data. Leverages Graph Analysis for Fast Processing & Easy Data Exploration http://p.sf.net/sfu/hpccsystems _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
------------------------------------------------------------------------------ HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions Find What Matters Most in Your Big Data with HPCC Systems Open Source. Fast. Scalable. Simple. Ideal for Dirty Data. Leverages Graph Analysis for Fast Processing & Easy Data Exploration http://p.sf.net/sfu/hpccsystems _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel