'Shuts all file descriptors (input and output) and clears all memory
usage.'

def close(self):

    self.pages = []
    for (fo, pdfr, mine) in self.inputs:
        if mine:
            fo.close()
    self.inputs = []
    self.output = None
