Hello,<br><br>I want to know what exactly happens in this scenario. I have a C++ class say, "myClass"<br><br>myClass<br>{<br> ...<br> vtkActor2D *elementNumberActor;<br> ...<br>public:<br> ... // Constructors and destructors<br><br> void DisplayElementNumbers();<br> ...<br>};<br><br>Now, i have the function body as follows:<br><br>void myClass::DisplayElementNumbers()<br>{<br> vtkIdFilter *ids = vtkIdFilter::New();<br> ids->SetInputConnection( programmableFilter-> GetOutputPort() );<br> ids->CellIdsOn();<br> ids->FieldDataOn();<br><br> vtkCellCenters *cellC = vtkCellCenters::New();<br> cellC->SetInputConnection( ids->GetOutputPort() );<br> <br> vtkSelecttVisiblePoints *vispts = vtkSelectVisiblePoints::New();<br> vispts->SetInputConnection( cellC->GetOutputPort() );<br> vispts->SetRenderer( pRenderer );<br><br> vtkLabelDataMapper *ldm = vtkLabelDataMapper::New();<br> ldm->SetInputConnection( vispts->GetOutput
Port() );<br> ldm->SetLabelModeToLabelFieldData();<br><br> elementNumberActor = vtkActor2D::New();<br> elementNumberActor->SetMapper (ldm );<br><br> ldm->Delete();<br>vispts->Delete();<br>cellC->Delete();<br>ids->Delete();<br><br>}<br><br>Well, the statement in the box is <br><br>elementNumberActor = vtkActor2D::New();<br><br>If i call this function again and again, will this statement cause in memory leak ?? <br>How and what will be the performance of my application??<br><br>Thanks in advance<br><br>Regards<br>Rakesh Patil<br><br><br><div style="border-top:1px dashed #ccc; border-bottom:1px dashed #ccc; padding:5px;"><a href="http://mail.in.com/mails/new_reg.php?utm_source=invite&utm_medium=outgoing" style="font:13px arial; color:#1E56A1; text-decoration:none;">Dear <b>VTK !</b> Get Yourself a cool, short <b>@in.com</b> Email ID now!</a></div>