delorie.com/archives/browse.cgi | search |
X-Authentication-Warning: | delorie.com: mail set sender to geda-user-bounces using -f |
X-Recipient: | geda-user AT delorie DOT com |
Date: | Sun, 13 Mar 2016 18:04:41 +0100 (CET) |
X-X-Sender: | igor2 AT igor2priv |
To: | geda-user AT delorie DOT com |
X-Debug: | to=geda-user AT delorie DOT com from="gedau AT igor2 DOT repo DOT hu" |
From: | gedau AT igor2 DOT repo DOT hu |
Subject: | Re: [geda-user] pcb: more memory leaks |
In-Reply-To: | <alpine.DEB.2.00.1603130700180.7885@igor2priv> |
Message-ID: | <alpine.DEB.2.00.1603131725240.7885@igor2priv> |
References: | <alpine DOT DEB DOT 2 DOT 00 DOT 1603130700180 DOT 7885 AT igor2priv> |
User-Agent: | Alpine 2.00 (DEB 1167 2008-08-23) |
MIME-Version: | 1.0 |
Reply-To: | geda-user AT delorie DOT com |
Errors-To: | nobody AT delorie DOT com |
X-Mailing-List: | geda-user AT delorie DOT com |
X-Unsubscribes-To: | listserv AT delorie DOT com |
Going on with it; same remarks as before. 1. easy - hid/common/actions.c: all_actions[] is alloced but never freed. This will get more important if plugins need to be unloadable runtime (pcb-rnd aims to be able to do that eventually; not for unload alone, but for reload; plugins being unloaded should deregister their actions selectively). I don't say a revision number here because my implementation probably differs too much. 2. hard - global Library is never freed. It could be done at the end, but there's a trick: file.c/LoadNewLibFootprintsFromDir() sets entry->ListEntry to point into the middle of a string allocated elsewhere, while the rest of the code always allocates new memory for entry->ListEntry. I ended up adding a new field in library entry to keep track on whether ->ListEntry should be free()'d or not (r1252).
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |