I'm using gdb to debug...
after line 10 , ptxt suppose to be free and inaccessible but it displays the
following ptxt  value :
(gdb) display ptxt
1: ptxt = 0xbeca
"B8500C4C9F0E52EA414B7FD2D6D3353BB5EEA88676D7308BD8261ED7C12D38B5"

subsequently, it execute line 11 and 12 which leads it to the error :
directly read from unallocatable chunck of memory ....

does it mean the ptxt already been free? If so,  ptxt should be null and
line 12 should not be executed ...

Can someone plz explain ...thanks.

Code
====
        ptxt = (Char*) MemPtrNew(MAX_HEX_INPUT+1);
        StrCopy(ptxt,input[testIndex]);

        ....

line10 :        MemPtrFree(ptxt);
line11: if(ptxt)
line12:         FrmCustomAlert(InfoAlert,"End of run", ptxt , " ");



Regards,
Tan Kuan Eeik
[EMAIL PROTECTED]


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to