[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Finding Memory Leak ?
At first I suspected the DICOM object but the two leftover pointers point to
data that appears to be the 'SIZE' of one of my array pointers (And both
pointers have the same value??!!). ie. my global sState or info structure
(attached to the base widgets uvalue) has several pointers which point to 3D
data I load in. The contents of the leftover pointer is a BYTARR(3) which
has the size(data, /N_DIMENSIONS) value ? Looking further into it, I do in
several places something like :
szData = SIZE( *sState.3Ddata, /N_Dimensions) and the value of szData is
equivalent to the leftover pointer contents. But I never create a pointer
to szData so the memory should be cleaned up when the Function/Procedure
exits right ??
ronn kling <email@example.com> wrote in message
> in article firstname.lastname@example.org, Richard Tyc at
> Richard_Tyc@sbrc.umanitoba.ca wrote on 9/21/00 2:32 PM:
> > I have checked every line of code where I create a new variable using
> > PTR_NEW and I always properly used PTR_Free on it. I also use the DICOM
> > method GetValue alot (which returns a pointer to the data) but always
> > /NO_COPY so the pointers point to actual data within the object which
> > get properly removed when the object is destroyed.
> Two things cross my mind right away.
> 1. Are you creating a subclass of the DICOM object? If so, you have to
> the cleanup method directly from the child object. If you don't then any
> pointers created by the parent will not be freed.
> 2. Are you creating the DICOM object more than once so that when you
> it only the last one is destroyed?
> Ronn Kling
> Ronn Kling Consulting
> email: email@example.com
> "Application Development with IDL" programming book updated for IDL5.3!
> Shareware and Freeware at: http://www.rlkling.com/