[Insight-developers] DataObject:Initialize

John M. Galeotti jgaleotti at cmu . edu
Thu, 26 Jun 2003 15:54:39 -0400


Hello, I am making Path descend from DataObject, and I have a question 
about the Initialize() function, which is incidentally called by 
ReleaseData().  My question is whether or not I should de-allocate all 
the memory used to store a path in the Initialize function.  Is the 
following acceptable behavior?

ChainCodePath::Initialize
	Set start index to origin
	Clear (and possibly deallocate) all steps in the chain code (make it 0 
length)
	Do NOT deallocate the chain code object itself

ParametricPath::Initialize
	Set to default, unassigned state, which may be undefined
	Do NOT deallocate the parametric path object itself


The above behavior seems to allow correct behavior when 
ShouldReleaseData is turned on, but I'm not sure.  Could someone please 
help clarify.

Thank you,
John Galeotti
jgaleotti at cmu . edu