on 9/3/00 11:28 AM, David Kendall at [EMAIL PROTECTED] wrote:

> I have a quick & dirty database conversion/repair program that ships with my
> "real" product. It is used to upgrade the handheld databases, or to fix
> linkage problems caused by older versions (i.e. very rarely).
> 
> In testing, it is occasionally getting the "UIAppShell... records left
> locked in closed unprotected DB" depending upon the particular sample
> database getting upgraded.
> 
> Can anyone tell me what the impact of this might be?  (I'm very short of
> time for the next release, and I'd rather not spend any more time trying to
> track this down.)
> 
> Can I ignore it? Would it work to simply scan the db at quittin' time, look
> for busy records and unlock them? How about calling SysReset?

Impact: Since every record lock should be balanced with an unlock, I'd call
this an error that you should find. If you leave a record locked, you
fragment the storage heap by leaving a locked 'island' amidst the moveable
blocks (database records, headers, appInfo blocks, etc.). If you leave
several locked, your user might prematurely run out of available storage
because of the fragmentation. A soft reset will fix this, but I know you
would never depend on this to fix an error in code.

You can add a DEBUG clause in your AppStop routine that scans for locked
records (or busy records, while you are at it), but that will only tell you
that you have a problem, not where the problem is in your code.

JB

----------------------------------------------
JB Parrett                 [EMAIL PROTECTED]
Palm, Inc.         

We grow a lot faster than trees,
so we miss a lot of stuff. - B. Andreas


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