Why I'm having this warning, Too many active WebGL contexts. Oldest context will be lost.

Hello Paulo,

Thank you so much for your answer, yes what you said looks convenient,
Sorry I didn’t specify it before,

In my application I have a X number of patients, each patient has 3 files (A brain-MRI.vti, a brain-segmentation.vtk and a face-surface.vtk)

The user can choose from the list of patients a patient to display, so I charge the N patient files and I delete what is previously rendered (N-1) in order to render the new actors, (I delete the actors, mappers, widget (ResliceCursorWidget) and the OpenGLRenderWindow and the GenericRenderWindow),

I don’t know if this the right way to do it,
[video-to-gif output image]

PS: in the 3D view I have:
PLANS VIEW: Plans actors + Sphere actor
CERVEAU VIEW: Polydata actor + Sphere actor
PEELING VIEW: 2 Poly data actors + Sphere actor