<div dir="ltr"><div><div>Hello everyone,<br><br><br></div>I am  having a hard time by using a vtkMultiBlockDataSet , I have attached a small but working example of what I want to achieve, a dummy reader , it does not read but add a bunch of vtkStructuredGrid's<br><br></div><div>My problem is a bit more complex, but long story short; I have a hierarchical vtkMultiBlockDataSet<br><br>vtkMultiBlockDataSet (level0)   declared using a vtkSmartPointer<vtkMultiBlockDataSet><br>-vtkMultiBlockDataSet (level1)<br>--vtkMultiBlockDataSet (level2)<br>--vtkMultiBlockDataSet (level2)<br></div><div>---vtkStructucuredGrid (level3) <br>---vtkStructucuredGrid  (level3)<br>---vtkStructucuredGrid (level3)<br>--vtkMultiBlockDataSet (level2)<br><br></div><div>In my RequestData I create the structure  all with smart pointers, if it is not created ,  and flag is set  to avoid creating again the skeleton  <br>*** if !this->rootMB_init ***<br><br></div><div>I use a vtkIntProperty (Select Block)  to tell the server to fill up any level3 (StructuredGrid), for example <br></div><div>SelectBlock: 4 -> Apply, (it loads grid 4, marked as unloaded )<br></div><div>SelectBlock:-1 -> Apply (nothing)<br>SelectBlock:4 -> Apply (unload grid 4 , since is loaded and marked as loaded )<br></div><div><br></div><div>when I repeat the sequence with several blocks  the memory is not being released somehow. I think my problem is here, but i cannot see it..<br><br></div><div>if (block loaded)  //line 110<br>{<br></div><div>      vtkSmartPointer<vtkStructuredGrid>grid=ReadGrid(500 ,0.01, iL3 , iL3, iL3);  //500x500x500 nodes ~2.6GB<br>      vtkMultiBlockDataSet->SetBlock(block, grid);<br></div><div>}<br></div><div>else if ( !blockIsLoaded)  //line 118<br>{<br>       vtkSmartPointer<vtkStructuredGrid>grid=vtkSmartPointer<vtkStructuredGrid>::New()<br>       vtkMultiBlockDataSet->SetBlock(block, grid);<br></div><div>       isBlockLoaded=false;<br></div><div>}<br></div><div><br></div><div><br></div><div>maybe I am initializing wrong . I have read the recommendations about vtkSmartPointer . Smart pointers for new objects and std pointer (vtkMultiBlockDataSet *, etc) for references <br><br></div><div>In order to compile just  untar  ; cd build  , cmake .. ; make   the extension is *.mem i have included an empty  dummy.mem for reading <br><br></div><div>maybe you can give me a  hint , or an advice of a better way to <br></div><div><br></div><div>Thank you so much in advance <br><br></div><div>Julia <br><br><br></div></div>