Thread Previous • Date Previous • Date Next • Thread Next |
On 8/6/2012 5:43 AM, Lorenzo Marcantonio wrote:
I'm looking how to use the dsnlexer; in kicad_plugin.cpp, PCB_IO::Load a PCB_PARSER is instantiated using a FILE_LINE_READER created on the heap. However the PCB_PARSER constructor uses a constructor which, according to the comments, doesn't take possession of the LINE_READER. Wouldn't this cause a leak of FILE_LINE_READERs every time a file is opened or I'm missing something?ZZ
Good catch. The base DSNLEXER constructor that I called does not take ownership of the LINEREADER. The other two DSNLEXER constructors take ownership of the LINEREADER by default. I must have misread it when I looked at. I will fix it as soon as I get a chance.
Wayne
Thread Previous • Date Previous • Date Next • Thread Next |