On Tue, 7 Nov 2017, African Wild Dog wrote:
Hello,
Using ReadXMLFile function from XMLRead unit generates memory leaks when
trying to read a invalid XML content.
The "memory leak" is the exception object: you are not catching the exception.
Change your program to the below, and you'll see
Hi,
if I run the code it writes "Unhandled exception". I tried to add another
try..except block and it's OK.
program xml_leak_test;
{$mode objfpc}
uses
heaptrc,
Classes,
DOM,
XMLRead;
var
XMLDocument: TXMLDocument;
InvalidStream: TStringStream;
const
INVALID_XML_CONTENT = '<<>>
Hello,
Using ReadXMLFile function from XMLRead unit generates memory leaks when
trying to read a invalid XML content.
CODE
program xml_leak_test;
uses
heaptrc,
Classes,
DOM,
XMLRead;
var
XMLDocument: TXMLDocument;
InvalidStream: TStringStream;
const
INVALID_XML_CONTENT
James Richters wrote:
I've noticed that line numbers are sometimes off, sometimes quite a bit when I
receive a run-time error. I had one today, it specified the correct function
that was responsible for generating the error, however the line number was way
off, it reported line 1463 but the
>Didn't the unit have any include file?
My doesn't have any include files. It's just a collection of procedure and
functions that I use in many different programs.. but the unit also uses a lot
of other units, some are more of my own, others are standard FPC units.
>I vaguely recall reading som
On 06/11/17 21:49, James Richters wrote:
> I've noticed that line numbers are sometimes off, sometimes quite a
> bit when I receive a run-time error. I had one today, it specified
> the correct function that was responsible for generating the error,
> however the line number was way off, it repor