Drawing a Path dynamically (High Memory Uses)

I am drawing a flight path dynamically using PolylineCollection. I add one Polyline to my PolylineCollection and Keep setting polyline's positions attribute. The problem is as number of points increase the memory uses by the browser(Chrome) also increases dramatically(1.5GB for 1000 Points) and if i keep running the process it will crash(at around 1500-2000 Points). Below is the code i am using to draw my path

var positions = ;
var pathPolylineCollection = new Cesium.PolylineCollection();
        positions: positions,
        width: 2,
        show: true,
        material: Cesium.Material.fromType('Color', {
               color: new Cesium.Color(1,1,1,1)

// adds a single point to path
var addPoint = function(XYZPoint){
    var polyline = pathPolylineCollection.get(0);
    polyline.positions = positions;

Our belief is that this is a bug in Chrome Try the same thing in Firefox and you won’t have a problem.

You can help raise this issue with the Chrome dev team by starring the two bugs listed below.