All,

    I am new to plam programming.  I have a quick question about the data
manager.  I have read the programmers companion (volume 1) and I have a
couple quick question.

Are the entries stored in the database moveable (by the memory manager)?
The reason I ask is because I am writing some test code to get familiar with
the environment.  I have created a database that just stores text strings
and I am putting those test strings in a list control.  Currently, I am
storing the address of returned to me when I lock down the record returned
by the data manager via DmGetRecord.  I am then unlocking the memory and
releasing the record.  I believe that this is probably a really bad idea
because I do not keep the records locked down therefore the memory manager
is free to move the memory if needed, which would make my pointers invalid.
Is this a correct assumption?

If my above scenario is correct, then what is the recomended method.  Is it
better to keep the records locked down so that the memory manager cannot
move them, or is it better to copy them to dynamically created memory and
keep two copies of the data?

Thanks,

Brad Figler




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

Reply via email to