By removing _transparentPrimitiveInfo in the dispose function, I solved this problem.
RenderablePrim2D.prototype.dispose = function () {
if (!_super.prototype.dispose.call(this)) {
return false;
}
if (this._modelRenderInstanceID) {
this._modelRenderCache.removeInstanceData(this._modelRenderInstanceID);
this._modelRenderInstanceID = null;
}
if (this._modelRenderCache) {
this._modelRenderCache.dispose();
this._modelRenderCache = null;
}
if (this._transparentPrimitiveInfo) {
this.renderGroup._renderableData.removeTransparentPrimitiveInfo(this._transparentPrimitiveInfo);
this._transparentPrimitiveInfo = null;
}
if (this._instanceDataParts) {
this._instanceDataParts.forEach(function (p) {
p.freeElements();
});
this._instanceDataParts = null;
}
return true;
};