Hi all,<div><br></div><div>I would like to delete/remove actors from my rendering window to free memory.</div><div>The issue is that the memory usage doesn't decrease after removing/deleting the actors.</div><div><br></div>
<div>From my understanding, both following pseudo-codes should use the same amount of memory.</div><div>But,</div><div>The first one uses: 15 Mb for 1000 spheres:</div><div>The second uses: 90 Mb for 1000 spheres:</div><div>
<br></div><div>How should I proceed in the 2nd case, to get back to the "original" memory usage without actor?</div><div><br></div><div>Thanks,</div><div><br></div><div><br></div><div>Nicolas</div><div>______________________________</div>
<div>15 Mb</div><div>______________________________</div><div><br></div><div>//Create a sphere</div><div>vtkSphereSource* sphere = new ...</div><div>______________________________</div><div>90 Mb</div><div>______________________________</div>
<div><br></div><div>//Create sphere</div><div>vtkSphereSource* sphere = new ...</div><div><br></div><div>// mapper</div><div>vtkMapper* mapper ...</div><div>mapper->SetInput( sphere->GetOutput() )</div><div><br></div>
<div>// actor</div><div>vtkActor* actor...</div><div>actor->SetMapper(mapper)</div><div>mapper->Delete()</div><div><br></div><div>// Add and remove actor</div><div>renderer->AddActor(actor)</div><div>renderer->RemoveActor(actor)</div>
<div><br></div><div>// Delete actor</div><div>actor->Delete()</div><div>______________________________</div><div>______________________________</div><div><br></div><div><br></div>