1.TeeChart AddXY() 描点 所增加的内存如何释放?
2.
while (!rs.IsEOF())
{
for (int i = 0; i < sizeof(fieldNamee) / sizeof(char*); ++i)
{
short index = rs.GetFieldIndexByName(fieldNamee[i]);
rs.GetFieldValue(index, value);
double douValue = atof(value.GetBuffer()); //CString 强转成 double
switch (i)
{
case 0:
((CSeries)m_chart1.Series(nline0)).AddXY(s_x, douValue, nowTime, RGB(0, 0, 0)); //AddXY(x, y, x_str, RGB)
m++;
printf("描点次数为:%d \n", m);
break;
case 1:
((CSeries)m_chart1.Series(nline1)).AddXY(s_x, douValue, nowTime, RGB(255, 0, 0));
break;
case 2:
((CSeries)m_chart1.Series(nline2)).AddXY(s_x, douValue, nowTime, RGB(46, 139, 87));
break;
case 3:
((CSeries)m_chart1.Series(nline3)).AddXY(s_x, douValue, nowTime, RGB(0, 0, 255));
break;
case 4:
((CSeries)m_chart1.Series(nline4)).AddXY(s_x, douValue, nowTime, RGB(205, 92, 92));
break;
case 5:
((CSeries)m_chart1.Series(nline5)).AddXY(s_x, douValue, nowTime, RGB(255, 185, 15));
break;
default:
break;
}