Track locks into a global array so that we don't have to release() manually if our code dies.
internalize the locks array into our instance object.