Uno Bridge High Memory

Method:
(1) RUN a uno bridge waiting to connnect:
soffice.bin -headless --invisible --accept "socket,host=127.0.0.1,port=2003,tcpNoDelay=1;urp;StarOffice.ComponentContext"
(2) Deploy a pyuno convertion program(reference: GitHub - unoconv/unoserver)
Problem:
    When I send a covertion task the process increase its memory, even a small size docx (converted to pdf, 3.5M-60pages), even if I use document.close(True) / document.dispose()
Ask:
    After a convertion, how do I releas all the resources brought by the input doucment using python code, I alseo try:
desktop.terminate() / context.dispose()
    The two methods will kill the bridge listennig process
context = uno.getComponentContext()
    The getComponentContext() method is a singleton instance?