[vtkusers] Use of reset()

Philip Morris Jones philip at uk.cd-adapco.com
Tue Mar 18 02:20:47 EST 2003


Hi

I am using vtk in an interactive application and find that I am doing a lot
of ::New() and ->Delete() operations. I suspect that I am getting memory
fragmentation as after a while I cannot get any more memory.

I think that maybe a way round this is to use the Reset() function. A couple
of questions:

1) Is this OK and will it do what I hope: I hope that I will establish a
high-water mark and it will jsut re-use the same memory time and again.

2) In many places I use Insert (e.g. InsertPoint) rather than InsertNext
(i.e. InsertNextPoint), will this lead me to any troubles? If I fill cells
1,2,3,4 and 5, then reset, and insert cells 1,2 and 6, will I have the right
cells or will it get mixed up?

Thanks

Philip


Philip M Jones
MA MSc MIMechE CEng
CD adapco Group
London Office
Tel +44 (0) 20 7471 6200
philip.jones at uk.cd-adapco.com
www.cd-adapco.com




More information about the vtkusers mailing list