Pcbnew, Cvpcb: fix Bug #1355883 . Due to a missing call to a delete operator in CMP_READER class (also creates memory leak).
This commit is contained in:
parent
3a62a59514
commit
5b28980a05
|
@ -55,11 +55,26 @@ class CMP_READER
|
||||||
LINE_READER* m_lineReader; ///< The line reader to read.
|
LINE_READER* m_lineReader; ///< The line reader to read.
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* CMP_READER constructor.
|
||||||
|
* @param aLineReader is a LINE_READER (in fact a FILE_LINE_READER)
|
||||||
|
* which is owned by me ( and deleted by me) to read
|
||||||
|
* the component footprint link file.
|
||||||
|
*/
|
||||||
CMP_READER( LINE_READER* aLineReader )
|
CMP_READER( LINE_READER* aLineReader )
|
||||||
{
|
{
|
||||||
m_lineReader = aLineReader;
|
m_lineReader = aLineReader;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
~CMP_READER()
|
||||||
|
{
|
||||||
|
if( m_lineReader )
|
||||||
|
{
|
||||||
|
delete m_lineReader;
|
||||||
|
m_lineReader = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function Load
|
* Function Load
|
||||||
* read the *.cmp file format contains the component footprint assignments created by CvPcb
|
* read the *.cmp file format contains the component footprint assignments created by CvPcb
|
||||||
|
|
Loading…
Reference in New Issue