At 08:29 PM 4/16/2005, you wrote:
I've got an application using VFS functions.

I query a database on a memory card using DmQueryRecord. once finished with the record, I free the handle and set it to NULL.

However, on the Treo 650 or T5 there still seems to be a memory leak in that if i access 10 or so records in a row the device resets itself.
I open the database at startup and close it at shutdown of the application as its a rather large database. Trying to keep the performance at a maximum.


At the moment I only have access to my Mac with CodeWarrior 9 so i can't run a Simulator and the Emulator obviously doesn't run a 650 or T5 ROM.

Is there something i'm missing?

Try replacing the call to DmQueryRecord with a call to DmGetRecord followed by DmReleaseRecord. This is a much safer operation on devices that use NVFS, as this lets the system know you're done accessing the record and it can remove it from the cache, while it has to guess, based on least-recently-used information, about what records accessed by DmQueryRecord are still active. As long as you don't mark the record as dirty, you shouldn't see a performance difference.



-- Ben Combee, Senior Software Engineer, palmOne, Inc. "Combee on Palm OS" weblog: http://palmos.combee.net/ Developer Forum Archives: http://news.palmos.com/read/all_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