Prevent APICache from holding file descriptors open until program exit

Review Request #6899 — Created Feb. 3, 2015 and submitted — Latest diff uploaded

Information

RBTools
master
a272751...

Reviewers

Previously the APICache would keep file descriptors open until the
program exited. This was because of a call to atexit.register that
increased the reference count of the APICache. However, we always
write to the database after every database change, so this is
unnecessary. Removing the call to atexit.register allows the open
file descriptors to be closed when an APICache goes out of scope.

Ran unit tests.

I ran the test.py file attached in report of issue 3751 before and
after the change. Before the change, the list of open file
descriptors would grow with each call to the doit function. After
the change, the list of open file descriptors is always be the
empty list.