How to delete a Primitive?

I'm trying to delete a primitive (Polygon or Polyline) previously added like this:

primitive.destroy();

or

scene.getPrimitives().remove(primitive);

but both methods give me this error:

DeveloperError: This object was destroyed, i.e., destroy() was called.
Error
    at new t (http://cesiumjs.org/Cesium/Build/Cesium/Cesium.js:405:3035)
    at o (http://cesiumjs.org/Cesium/Build/Cesium/Cesium.js:414:9476)
    at o.update (http://cesiumjs.org/Cesium/Build/Cesium/Cesium.js:433:11535)
    at tt (http://cesiumjs.org/Cesium/Build/Cesium/Cesium.js:435:26010)
    at at.render (http://cesiumjs.org/Cesium/Build/Cesium/Cesium.js:435:29699)
    at P.render (http://cesiumjs.org/Cesium/Build/Cesium/Cesium.js:440:25610)
    at t (http://cesiumjs.org/Cesium/Build/Cesium/Cesium.js:440:9605)

That exception indicated that you are doing something causing the primitive to be destroyed twice. I believe primitives get destroyed automatically on remove by default, so no other work should need to be done on your part. Can you post a more complete example so we can help you pinpoint the problem?

Thank you Matthew,
I realized that

map.scene.getPrimitives().remove(primitive);

is working fine if primitive is a Polygon or a Polyline but give me the same error if it’s a BillboardCollection

Can you post a small snippet of code that reproduces the problem?

Sorry Matthew, I’ve found my problem.
I think the error was caused adding a BillboardCollection twice.