fix WCartesianChart memory leak (#2743)