[vtkusers] Tr : Release Memory after rendering

Mohamed Ben Reguiga breguiga_mh at yahoo.fr
Tue Apr 8 03:58:44 EDT 2008


Hello Japrin,
the method reduces the amount of the memory allocated but doesn't releases it completely.
I've tryide what following :
//delete the memory allocated for the reader : it's a vtkstructedPoints in my case
delete[]((unsignedchar*)reader->GetScalarPointer());reader->Delete();
//then I deallocate the tables created for computin gradiants et displaying the volume
//vlmMppr : vtkVolumeRayCastMapperif
if(vlmMppr->GetGradientEstimator() && vlmMppr->GetGradientEstimator()->GetGradientMagnitudes())delete[](vlmMppr->GetGradientEstimator()->GetGradientMagnitudes());
I know it's really a little bit uggly , but the method i'(m followin is the most efficient for memory release after rendering.
but never , all the memory was released.
tahnk you for your help. .
BEN REGUIGA Mohamed(vlmMppr->GetGradientEstimator() && vlmMppr->GetGradientEstimator()->GetEncodedNormals())delete[](vlmMppr->GetGradientEstimator()->GetEncodedNormals());
----- Message transféré ----
De : "swordlover1986 at 163.com" <swordlover1986 at 163.com>
À : vtkusers at vtk.org
Envoyé le : Lundi, 7 Avril 2008, 16h44mn 59s
Objet : Re: [vtkusers] Release Memory after rendering

Hi,Mohamed Ben Reguiga:

I'm facing a similar problem.Could "void vtkActor::ReleaseGraphicsResources(vtkWindow *)" take effect?



Japrin


________________________________
中 国 最 强 网 游 --- 网 易 梦 幻 西 游 ,166 万 玩 家 同 时 在 线 


      _____________________________________________________________________________ 
Envoyez avec Yahoo! Mail. Une boite mail plus intelligente http://mail.yahoo.fr
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20080408/3dfc9c3d/attachment.htm>


More information about the vtkusers mailing list