Eeschema Eagle Import: memory leak fixes
This commit is contained in:
parent
37445042ed
commit
d4201ef51f
|
@ -1179,8 +1179,8 @@ EAGLE_LIBRARY SCH_EAGLE_PLUGIN::loadLibrary( wxXmlNode* aLibraryNode )
|
|||
|
||||
while( symbolNode )
|
||||
{
|
||||
wxString symbolName = symbolNode->GetAttribute( "name" );
|
||||
elib.symbolnodes[symbolName.ToStdString()] = symbolNode;
|
||||
string symbolName = symbolNode->GetAttribute( "name" ).ToStdString();
|
||||
elib.symbolnodes[symbolName] = symbolNode;
|
||||
symbolNode = symbolNode->GetNext();
|
||||
}
|
||||
|
||||
|
@ -1239,9 +1239,9 @@ EAGLE_LIBRARY SCH_EAGLE_PLUGIN::loadLibrary( wxXmlNode* aLibraryNode )
|
|||
kpart->SetUnitCount( gates_count );
|
||||
if(gates_count == 1 && ispower) kpart->SetPower();
|
||||
|
||||
const string& name = kpart->GetName().ToStdString();
|
||||
string name = kpart->GetName().ToStdString();
|
||||
m_partlib->AddPart( kpart.get() );
|
||||
elib.kicadsymbols[name] = kpart.release();
|
||||
elib.kicadsymbols.insert( name, kpart.release() );
|
||||
|
||||
deviceNode = deviceNode->GetNext();
|
||||
} // devicenode
|
||||
|
@ -1267,7 +1267,7 @@ bool SCH_EAGLE_PLUGIN::loadSymbol( wxXmlNode* aSymbolNode,
|
|||
bool foundName = false;
|
||||
bool foundValue = false;
|
||||
bool ispower = false;
|
||||
int pincount;
|
||||
int pincount = 0;
|
||||
|
||||
while( currentNode )
|
||||
{
|
||||
|
|
|
@ -69,8 +69,8 @@ class LIB_TEXT;
|
|||
typedef struct EAGLE_LIBRARY
|
||||
{
|
||||
std::string name;
|
||||
boost::ptr_map<std::string, LIB_PART*> kicadsymbols;
|
||||
boost::ptr_map<std::string, wxXmlNode*> symbolnodes;
|
||||
boost::ptr_map<std::string, LIB_PART> kicadsymbols;
|
||||
std::unordered_map<std::string, wxXmlNode*> symbolnodes;
|
||||
std::unordered_map<std::string, int> gate_unit;
|
||||
std::unordered_map<std::string, std::string> package;
|
||||
|
||||
|
|
Loading…
Reference in New Issue