Sign in to follow this  
huricane

Memory Leak When Updating Fussioncharts In Winforms

Recommended Posts

Hi,

 

I have developed a small wrapper over FussionCharts. The general idea is to make real time update available for the FussionCharts. I have a timer which periodically updates the chart. Everything is done in C# with WinForms over Shockwave Objects.

 

The code used for updating chart is :

 

public virtual void UpdateData()

{

if (IsChartStarted == true)

{

lock (WidgetConfiguration) // multithreaded protection

{

this.BeginInvoke(new StopDelegate(Stop)); // call OCX Stop() in GUI thread

 

ConfigurationWriter = new StringWriter();

WidgetConfiguration.Save(ConfigurationWriter); // prepare XML for chart

this.BeginInvoke(new SetVariableDelegate(SetVariable), new object[] { "dataXML",ConfigurationWriter.ToString()}); // send XML to chart

ConfigurationWriter.Dispose();

ConfigurationWriter = null;

 

this.BeginInvoke(new RewindDelegate(Rewind)); // call Rewind() in GUI thread

 

this.BeginInvoke(new TPlayDelegate(TPlay), new object[] { "_root" }); // call TPlay() in GUI

 

}

}

}

 

After running this code for longer time I observe huge memory leak (private mem is high and GC mem is OK). Do you have any hint? Is this a bug inside FussionWidgets or there is something wrong with flash player OCX ?

 

I know that I am doing an uncommon task - updating a chart dinamically via WinForms but this is my requirement now. I am doing evaluation of your product and this my biggest worry regarding your charts.

 

Thanks for any help,

 

Best Regards,

 

Dominik

Share this post


Link to post
Share on other sites

Hi Dominik,

 

We have checked and our result concluded that this is a bug of Flash Player itself. So in order to overcome this issue, try to dispose Flash Player object and recreate it dynamically after a certain interval say 1 hrs or 2 hrs.

Share this post


Link to post
Share on other sites

Hi,

 

Thx for analysis - just for your information I used latest version of Flash Player 10.3.181.26

 

Do you plan to address this issue to Adobe? This might be worth trying as it touches the main functionality of your product.

 

Best Regards,

 

Dominik

 

Hi Dominik,

 

We have checked and our result concluded that this is a bug of Flash Player itself. So in order to overcome this issue, try to dispose Flash Player object and recreate it dynamically after a certain interval say 1 hrs or 2 hrs.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this