Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
484eb55a
Commit
484eb55a
authored
Oct 24, 2012
by
Dick Hollenbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DSN_LEXER underneath PCB_PARSER does not own the LINE_READER it receives, fix memory leak
parent
1e772280
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
kicad_plugin.cpp
pcbnew/kicad_plugin.cpp
+5
-4
No files found.
pcbnew/kicad_plugin.cpp
View file @
484eb55a
...
...
@@ -240,7 +240,8 @@ void FP_CACHE::Load()
}
// reader now owns fp, will close on exception or return
PCB_PARSER
parser
(
new
FILE_LINE_READER
(
fp
,
fpFileName
)
);
FILE_LINE_READER
reader
(
fp
,
fpFileName
);
PCB_PARSER
parser
(
&
reader
);
std
::
string
name
=
TO_UTF8
(
fpFileName
);
...
...
@@ -1493,12 +1494,12 @@ BOARD* PCB_IO::Load( const wxString& aFileName, BOARD* aAppendToMe, PROPERTIES*
if
(
!
file
.
IsOpened
()
)
{
wxString
msg
;
msg
.
Printf
(
_
(
"Unable to read file
\"
%s
\"
"
),
GetChars
(
aFileName
)
);
wxString
msg
=
wxString
::
Format
(
_
(
"Unable to read file
\"
%s
\"
"
),
GetChars
(
aFileName
)
);
THROW_IO_ERROR
(
msg
);
}
PCB_PARSER
parser
(
new
FILE_LINE_READER
(
file
.
fp
(),
aFileName
),
aAppendToMe
);
FILE_LINE_READER
reader
(
file
.
fp
(),
aFileName
);
PCB_PARSER
parser
(
&
reader
,
aAppendToMe
);
BOARD
*
board
=
dynamic_cast
<
BOARD
*>
(
parser
.
Parse
()
);
wxASSERT
(
board
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment