Hi,
I apologize for posting a reply to your announcement message because I did not see the "New Topic" button. Your reply on the thread https://www.steema.com/support/viewtopi ... 703#p78724 worked on the base TChart controls, but failed on our controls that inherit from TChart.
Upon further checking, we had the line below that seems to raise the NullReferenceException on Dispose.
tChart1.Graphics3D.BufferStyle = Steema.TeeChart.Drawing.BufferStyle.DoubleBuffer;
This line was inserted to resolve an issue we encountered 9 years ago - http://www.teechart.net/support/viewtop ... 156#p62249.
Do we still need the line to set the BufferStyle?
Disposing of TChart on Net 6
Re: Disposing of TChart on Net 6
Hello,
No; if that works ok for you that's fine, ignore my recommendation. I've made a note of the issue I encountered as it may affect other projects with a different buffer setting.
Regards,
Marc
No; if that works ok for you that's fine, ignore my recommendation. I've made a note of the issue I encountered as it may affect other projects with a different buffer setting.
Regards,
Marc
Steema Support
Re: Disposing of TChart on Net 6
Thank you for the prompt reply.
Your recommendation (to generate the bitmap) is still required when we generate and dispose of TCharts that are not shown to the user. As it turns out though, we needed to generate the bitmap before setting the bufferStyle to avoid the NullReferenceException. Thank you for the assistance.
Dim x As New Steema.TeeChart.TChart
x.Bitmap(20, 20)
x.Graphics3D.BufferStyle = Steema.TeeChart.Drawing.BufferStyle.DoubleBuffer
x.Dispose()
Your recommendation (to generate the bitmap) is still required when we generate and dispose of TCharts that are not shown to the user. As it turns out though, we needed to generate the bitmap before setting the bufferStyle to avoid the NullReferenceException. Thank you for the assistance.
Dim x As New Steema.TeeChart.TChart
x.Bitmap(20, 20)
x.Graphics3D.BufferStyle = Steema.TeeChart.Drawing.BufferStyle.DoubleBuffer
x.Dispose()