kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #41890
Re: [Patch] Fix some memory leaks
Le 12/08/2019 à 21:54, Wayne Stambaugh a écrit :
> Sounds like a plan. If there are not bug reports against this over the
> next month, I'll will cherry-pick it into 5.1.
>
> Wayne
I am not sure this issue exists in 5.1.
AFAIK it comes from moving code from our DLIST to std::deque, only in
master branch.
Our DLIST dtor manages (when it has the ownership) the items deletion.
But std::deque does not delete the items, so the code using std::deque
has to delete these items.
>
> On 8/12/19 3:47 PM, Ian McInerney wrote:
>> Wayne, lets let this settle in master for a while to make sure that no
>> issues due to object lifetime surface.
>>
>> -Ian
>>
>> On Mon, Aug 12, 2019 at 9:20 PM Wayne Stambaugh <stambaughw@xxxxxxxxx
>> <mailto:stambaughw@xxxxxxxxx>> wrote:
>>
>> Ian,
>>
>> I merged your patch. I'm guessing this should be cherry-picked into the
>> 5.1 branch.
>>
>> Thanks,
>>
>> Wayne
>>
>> On 8/11/19 4:42 PM, Ian McInerney wrote:
>> > I was noticing there were some memory leaks inside the board/module
>> > classes that got somewhat extreme in some cases (I saw ~300MB leaked
>> > from opening and closing cvpcb in Eeschema when run without a project
>> > manager). This patch adds some deletion to the destructors of the
>> > board/module classes, so they now will delete their sub items.
>> >
>> > I believe these classes are the respective owners of those pointers to
>> > the sub items, and my testing doesn't show any problems with this, but
>> > if anyone can see a case where deleting these sub items on destruction
>> > might be an issue, let me know.
>> >
>> > -Ian
>> >
>> > _______________________________________________
>> > Mailing list: https://launchpad.net/~kicad-developers
>> > Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
>> <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
>> > Unsubscribe : https://launchpad.net/~kicad-developers
>> > More help : https://help.launchpad.net/ListHelp
>> >
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~kicad-developers
>> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
>> <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
>> Unsubscribe : https://launchpad.net/~kicad-developers
>> More help : https://help.launchpad.net/ListHelp
>>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help : https://help.launchpad.net/ListHelp
>
--
Jean-Pierre CHARRAS
Follow ups
References