Until just now I had thought that the two operations below were identical.
A bug I just found in my code made me realize that they're not. Is there a C
wiz out there that could explain the difference? Thanks so much.  The
Char*'s point into the dynamic heap, where they have been allocated with
MemPtrNew, and then they are written into the packed record later when the
record is closed.

typedef struct FlightDB {
 UInt32 trip;
 MemHandle packedH;
...
 Char* from;
 Char* to;
 } FlightDB;

FlightDB* fRecPOne;
FlightDB* fRecPTwo;

Op #1:  *fRecPOne = *fRecPTwo;

Op #2:  MemMove(fRecPOne, fRecPTwo, sizeof(FlightDB));



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

Reply via email to