factory AutoCloseable