free handle arrays on library unload