Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Memory leak in PageProducer?? Please help..

5 views
Skip to first unread message

LorenK

unread,
Jul 3, 2007, 4:11:32 PM7/3/07
to
think i found a serious memory leak when calling
pageproducer.content.. Here is the code to reproduce - the
pageproducer content and htmlfile are completely blank - so its
actually not even parsing anything. Also, set the script engine to
JScript. So the question is - is the leak in delphi code or is in
microsoft code, because for each content call, scriptcl.dll,
jscript.dll, and vbscript.dll are loaded and unloaded.

program MemLeakTest;


{$APPTYPE CONSOLE}


uses
SysUtils,
LeakTestDataModule in 'LeakTestDataModule.pas' {DataModule2:
TDataModule};


begin
try
DataModule2 := TDataModule2.Create(NIL);
DataModule2.ExecuteMemLeak;
{ TODO -oUser -cConsole Main : Insert code here }
except
on E:Exception do
Writeln(E.Classname, ': ', E.Message);
end;
end.


unit LeakTestDataModule;


interface


uses
SysUtils, Classes, HTTPApp, WebModu, HTTPProd, ReqMulti, WebUsers,
WebSess,
WebDisp, WebAdapt, WebComp;


type
TDataModule2 = class(TDataModule)
PageProducer1: TPageProducer;
procedure PageProducer1HTMLTag(Sender: TObject; Tag: TTag;
const TagString: string; TagParams: TStrings; var ReplaceText:
string);
private
{ Private declarations }
public
{ Public declarations }
procedure ExecuteMemLeak;
end;


var
DataModule2: TDataModule2;


implementation


{$R *.dfm}


{ TDataModule2 }


procedure TDataModule2.ExecuteMemLeak;
var
x: Integer;
begin
for x := 0 to 10000 do
datamodule2.PageProducer1.Content;


end;


end.

0 new messages