[gdome]Memory leak?



Hello,

first of all I want to tell you that my first implementation
of gdome for delphi does work now.
(Thanks to Tobias.)
If you want to hear more about its development, look at
news://newsgroups.borland.com/borland.public.delphi.xml.

Now I have a little memory leak:

If I call this procedure 100 times, the program uses
about 4kBytes more memory:

Procedure Native;
// An Example Programm for the direct use of gdome
// (without the xmldom.pas interface)
var domimpl: PGdomeDOMImplementation;
    doc: PGdomeDocument;
    exc:GdomeException;
    name: PGdomeDOMString;
begin
  domimpl:=gdome_di_mkref; // create a domreference
  name:=gdome_str_mkref (pchar('TEST'));
  doc := gdome_di_createDocument(domimpl, NIL, name, NIL, @exc);
  gdome_str_unref(name);
  gdome_di_freeDoc (domimpl, doc, @exc);
  gdome_di_unref(domimpl, @exc); // free the dom reference
end;

Well, the task-manager of windows does say that, and it might be
inaccurate.

Did I forget to free anything?

Best regards:

Uwe Fechner




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]