Maria ([EMAIL PROTECTED]) wrote:
>I have a problem with my program. When I want to close it i get this >error
>message:
>
>ProjectCTR(unknown version) just read from memory location 0x0001A543,
>causing an adress error.
>
>An "adress error" means that the applikation accessed a 2-or 4-byte >value 
>at
>an odd (i.e., not even) memory address.

<snip>
>       //Frig�r databaserna
>       if(proDb != NULL)
>                       delete proDb;

It may seem dumb to say it, but *usually* error messages give a good 
description of what's going wrong....  In this case I'd suspect somewhere 
you have a pointer-to-char that's pointing at uneven address and the CPU 
doesn't like those...  One other comment: in C++ it is not an error to 
delete a NULL (or 0 if you prefer) pointer, so, you would be equally correct 
to write all those "if (ptr != NULL) delete ptr;"
statements as just the line: "delete ptr;"

HTH,
Martin



_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


-- 
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