How to delete step file after importing it

Hello:
I want to delete the step file after importing it. The Step file is imported by STEPCAFControl_Reader. Then the reader transfer into (TDocStd_Document) doc. The doc is inited by XCAFApp_Application.
After everything is done. The doc is closed by XCAFApp_Application::Close(doc).
But I still cannot delete the step file. Am I missing some step?