On Tuesday, 16 October 2001 9:08 PM, jonathan <jonnnathan@...> wrote: >still trying to track down a suspected memory leak [and whilst no one can >help me read the 'stdlog' file] i thought to create a debugging >fn. > >i need your help/feedback on this. > >the principal is to override the toolbox memory calls that i believe are >responsible, and log calls verifying symmetry... > If its just a memory leak you are looking for try this: CALL DEBUGSTR(";HT") myPointer& = FN NEWPTR _Clear(100 * 1024) CALL DEBUGSTR(";HT") IF myPointer& <> _nil THEN ignore% = FN DISPOSPTR(myPointer&) CALL DEBUGSTR(";HT") This demo show the Heap Totals (HT) before allocation, after allocation and after dispose. You will see in the little table that the non-relocatable (pointer) block count goes up, then down again as expected. You will need to put this call before and after the routine you believe is the trouble. Jamin