I need some support.
If I update the JQPlotdata propery in a timer, the used browser memory in the taskmanger increases until a crash.
Testcase:
You need just a region,plot and timer in the form.
Thank you!
- Code: Select all
unit Unit1;
interface
uses
Classes, SysUtils, IWAppForm, IWApplication, IWColor, IWTypes, IWCGJQControl,
IWCGJQPlotCharts, IWCGJQPlot, Vcl.Controls, Vcl.Forms, IWVCLBaseContainer,
IWContainer, IWHTMLContainer, IWHTML40Container, IWRegion, IWBaseComponent,
IWBaseHTMLComponent, IWBaseHTML40Component, IWCompExtCtrls;
type
TIWForm1 = class(TIWAppForm)
IWRegion1: TIWRegion;
IWCGJQPlot1: TIWCGJQPlot;
IWTimer1: TIWTimer;
procedure IWAppFormCreate(Sender: TObject);
procedure IWTimer1AsyncTimer(Sender: TObject; EventParams: TStringList);
public
end;
implementation
{$R *.dfm}
Uses IWCGAsyncRender,IWCGJQCommon;
procedure TIWForm1.IWAppFormCreate(Sender: TObject);
var
AxisItem: TIWCGJQPlotOptionsAxesItem;
begin
IWCGJQPlot1.JQPlotOptions.Title.Text:= 'MEM LEAK';
AxisItem:= IWCGJQPlot1.JQPlotOptions.Axes.Add;
AxisItem.Options.AxesRender:= jqparDateAxisRenderer;
//AxisItem.Options.TickAxisOptions.FormatString:= '%d. %#b.<br>%R';
AxisItem:= IWCGJQPlot1.JQPlotOptions.Axes.Add;
AxisItem.AxisType:= jqpoxyYAxis;
end;
procedure TIWForm1.IWTimer1AsyncTimer(Sender: TObject;
EventParams: TStringList);
begin
IWCGJQPlot1.JQPlotData:='[[["10-10-20",12.3],["11-10-20",14.3]]]';
RenderRegionAsync(IWRegion1,rramOldMethod,false);
end;
initialization
TIWForm1.SetAsMainForm;
end.