we do have utility functions to monitor locks to prevent things like that

i like to add a check after complex lengthy operations to ensure there are no accidental locks left

if you exit the application with the lock in effect you will get an error and the transaction is backed out.

IMO a lock/transaction does never exist after the program exits

BTW our source explorer can also help in finding issues with missing unlocks. Not all cases of course but in a lot of cases it can help