I made the change, still bus errors.....  

-----Original Message-----
From: Ben Combee [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 26, 2004 4:00 PM
To: Palm Developer Forum
Subject: RE: deleting global pointers

At 02:56 PM 4/26/2004, you wrote:
>* Global variables
>  *********************************************************************/
>char *gcDesc = new char(127);

This line allocates space for a single character, initialized to the value 
127.  I think you meant

char *gcDesc = new char[127];

which would be deallocated using

delete [] gcDesc;

>char *gcNote = new char(iNoteSize);

Same problem as above.  You need square brackets to allocate a character
array.

>char *gcApptDate = "     space for long date   ";
>char *gcDateTrigger = "     Select Start Date      ";

These aren't memory allocations.  You're just pointing to strings that are 
in the global variable space.



-- Ben Combee, DTS technical lead, PalmSource, Inc.
    Read "Combee on Palm OS" at http://palmos.combee.net/


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

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

Reply via email to